# swagger-api/swagger-core

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/swagger-api-swagger-core).**

7,528 stars · 2,255 forks · Java · Apache-2.0

## Links

- GitHub: https://github.com/swagger-api/swagger-core
- Homepage: http://swagger.io
- awesome-repositories: https://awesome-repositories.com/repository/swagger-api-swagger-core.md

## Topics

`hacktoberfest` `java` `open-source` `openapi` `openapi-specification` `openapi3` `rest` `rest-api` `swagger` `swagger-api` `swagger-oss`

## Description

swagger-core is a set of libraries for parsing, generating, and serializing OpenAPI specifications to automate REST API documentation. It provides tools to read, validate, and transform JSON or YAML specifications into programmable objects, as well as a generator that scans source code and annotations to create formal technical descriptions of an API.

The project enables bi-directional specification serialization, allowing in-memory API definitions to be converted between native language objects and structured files. It uses a plugin-based scanning mechanism and annotation-driven generation to map application resources to specification operations, with support for intercepting the pipeline to modify or filter the resulting output.

The library covers a broad range of API modeling capabilities, including the definition of request parameters, response schemas, security schemes, and data model constraints. It also manages specification processing through reference resolution, schema conversion, and validation against formal specification rules.

Automation utilities are available to resolve and generate specification files during the build process.

## Tags

### Development Tools & Productivity

- [Annotation-Driven Specification Generation](https://awesome-repositories.com/f/development-tools-productivity/annotation-driven-specification-generation.md) — Automatically constructs technical API definitions by scanning source code for metadata annotations.
- [API Resource Scanning](https://awesome-repositories.com/f/development-tools-productivity/api-resource-scanning.md) — Identifies endpoints to include in the specification by analyzing application instances or annotations. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration))
- [OpenAPI Specification Generators](https://awesome-repositories.com/f/development-tools-productivity/openapi-configurations/documentation-generators/openapi-specification-generators.md) — Scans source code and annotations to automatically generate structured OpenAPI JSON or YAML specification files.
- [OpenAPI Specification Parsers](https://awesome-repositories.com/f/development-tools-productivity/openapi-specification-parsers.md) — Parses OpenAPI JSON and YAML definitions into internal representations for processing and analysis. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---OpenAPI-3.1))
- [OpenAPI Specification Serializers](https://awesome-repositories.com/f/development-tools-productivity/openapi-specification-serializers.md) — Converts in-memory API object representations back into valid JSON or YAML specification documents. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---OpenAPI-3.1))
- [API Specification Tooling Integration](https://awesome-repositories.com/f/development-tools-productivity/api-specification-tooling-integration.md) — Produces standardized specification files that enable third-party tools to generate client libraries and interactive API explorers.
- [Build-Time Specification Exports](https://awesome-repositories.com/f/development-tools-productivity/build-time-specification-exports.md) — Generates static API specification files during the build process using specialized plugins. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Getting-started))
- [API Contract Synchronization](https://awesome-repositories.com/f/development-tools-productivity/ci-cd-integrations/api-contract-synchronization.md) — Automates the synchronization of technical API documentation with live code changes to maintain contract consistency.
- [Specification Exposure](https://awesome-repositories.com/f/development-tools-productivity/openapi-configurations/documentation-generators/openapi-specification-generators/specification-exposure.md) — Serves the technical specification as a file via dedicated resources for client consumption. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration))
- [Structured Documentation Generation](https://awesome-repositories.com/f/development-tools-productivity/openapi-configurations/documentation-generators/openapi-specification-generators/structured-documentation-generation.md) — Creates structured documentation for endpoints and authentication based on a formal specification. ([source](https://cdn.jsdelivr.net/gh/swagger-api/swagger-core@master/README.md))
- [Plugin-Based Scanning Frameworks](https://awesome-repositories.com/f/development-tools-productivity/plugin-based-scanning-frameworks.md) — Uses a plugin-based scanning mechanism to identify application endpoints and map them to operations.

### Programming Languages & Runtimes

- [Specification from Code Generators](https://awesome-repositories.com/f/programming-languages-runtimes/source-code-generators/specification-from-code-generators.md) — Produces OpenAPI/Swagger specification documents by scanning annotated source code. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---OpenAPI-3.1))
- [OpenAPI Schema Generators](https://awesome-repositories.com/f/programming-languages-runtimes/java-annotation-processors/openapi-schema-generators.md) — Generates OpenAPI specification documents by scanning resource classes or converting models into schemas. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Integration-and-Configuration))

### Web Development

- [API Documentation Tools](https://awesome-repositories.com/f/web-development/api-documentation-tools.md) — Provides a complete system for modeling API parameters, response schemas, and server metadata to automate REST documentation.
- [OpenAPI Response Definitions](https://awesome-repositories.com/f/web-development/api-management-tools/api-development-management/api-documentation/openapi-response-definitions.md) — Implements mechanisms for defining API response schemas and status codes for every operation. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Annotations))
- [API Metadata](https://awesome-repositories.com/f/web-development/api-metadata.md) — Provides systems for defining API endpoints and schemas using annotations to include metadata not inferable from code. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Getting-started))
- [Input Parameter Specifications](https://awesome-repositories.com/f/web-development/input-parameter-specifications.md) — Provides declarative definitions of path, query, and header variables that API endpoints accept. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Annotations))
- [Media Type Definitions](https://awesome-repositories.com/f/web-development/media-type-definitions.md) — Defines the content and media formats for parameters, request bodies, and responses. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Annotations))
- [Request Body Documentation](https://awesome-repositories.com/f/web-development/request-body-documentation.md) — Provides specification of the structure and requirements for incoming API request payloads. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Annotations))
- [REST API Specifications](https://awesome-repositories.com/f/web-development/restful-apis/rest-api-specifications.md) — Allows the definition of request payloads, response schemas, and security requirements within the API specification.
- [Automated Generation](https://awesome-repositories.com/f/web-development/restful-apis/rest-api-specifications/automated-generation.md) — Automatically generates OpenAPI specifications from application code to provide technical references for API consumers.
- [Global API Metadata](https://awesome-repositories.com/f/web-development/global-api-metadata.md) — Allows setting global properties including titles, versions, and contact information for the technical specification. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Annotations))

### Data & Databases

- [JSON Schema Modeling](https://awesome-repositories.com/f/data-databases/json-schema-modeling.md) — Provides structured data modeling for request and response validation using schemas. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Annotations))

### Software Engineering & Architecture

- [Operation Descriptions](https://awesome-repositories.com/f/software-engineering-architecture/api-description-standards/operation-descriptions.md) — Maps methods to operations using summaries and detailed descriptions to explain API functionality. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Annotations))
- [Class-to-Schema Conversion](https://awesome-repositories.com/f/software-engineering-architecture/class-to-schema-conversion.md) — Transforms application data classes into formal OpenAPI schemas by analyzing their types and constraints.
- [Object Mapping APIs](https://awesome-repositories.com/f/software-engineering-architecture/object-mapping-apis.md) — Maps formal API specifications to a programmable set of objects for transformation and manipulation.
- [OpenAPI Specification Management](https://awesome-repositories.com/f/software-engineering-architecture/openapi-specification-management.md) — Provides comprehensive tools for creating, validating, and transforming OpenAPI JSON or YAML files to maintain standard web service contracts.
- [OpenAPI Specification Validators](https://awesome-repositories.com/f/software-engineering-architecture/specification-validation-schemas/openapi-specification-validators.md) — Validates OpenAPI documents against formal specification rules to identify structural inconsistencies. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---OpenAPI-3.1))
- [API Reference Resolution](https://awesome-repositories.com/f/software-engineering-architecture/api-reference-resolution.md) — Bundles internal and external references within a document to consolidate all content. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---OpenAPI-3.1))
- [Bi-Directional Specification Serialization](https://awesome-repositories.com/f/software-engineering-architecture/bi-directional-specification-serialization.md) — Enables seamless conversion of API definitions between native language objects and JSON/YAML files.
- [Named Schema References](https://awesome-repositories.com/f/software-engineering-architecture/data-schema-definitions/named-schema-references.md) — Resolves internal and external references within the specification to bundle related data models.
- [Specification Generation Interceptors](https://awesome-repositories.com/f/software-engineering-architecture/specification-generation-interceptors.md) — The library executes custom logic before or after the scanning process to pre process or post process the specification. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Extensions))
- [Specification Pipeline Interception](https://awesome-repositories.com/f/software-engineering-architecture/specification-pipeline-interception.md) — Provides hooks to modify or filter the generated API specification before it is finalized.

### Security & Cryptography

- [Security Scheme Documentation](https://awesome-repositories.com/f/security-cryptography/api-authentication-schemes/security-scheme-documentation.md) — Defines security mechanisms and documents authentication requirements for specific API operations within the specification. ([source](https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Annotations))
