swagger-core is a free, open source api development & testing project written in Java and released under Apache-2.0. It has 7,530 GitHub stars, 2,259 forks and 197 open issues, and was last pushed 17 hours ago. On this registry it ranks #30 of 103 tracked projects in API Development & Testing, with 5 head-to-head comparisons available.

What is swagger-core?

Swagger Core is the Java implementation of the OpenAPI Specification that generates a machine-readable REST API description from JAX-RS2 annotations and Java classes, intended for Java server developers and API platform teams that publish and maintain OpenAPI documents alongside their services.

What it is

Swagger Core is a Java implementation of the OpenAPI Specification, distributed as part of the swagger-oss family of projects. It lives in the Java and JAX-RS2 ecosystem, and the current version supports JAX-RS2 in both the javax and jakarta namespaces. The current stable release is 2.2.55, published on 2026-08-31, and it tracks OpenAPI 3.x; support for OpenAPI 3.1 arrived in version 2.2.0. Since version 2.1.7 the project also ships a parallel set of artifacts carrying the -jakarta suffix, which provide the same functionality as the unsuffixed, javax-oriented artifacts. The project is licensed under Apache-2.0, is published to Maven Central as io.swagger.core.v3/swagger-project, and carries the topics swagger-api, openapi, openapi3, openapi-specification, rest-api, and java.

The concrete problem it solves is specification drift. Without generation, a team writes the OpenAPI description by hand, keeps it in a separate document, and then keeps it in step with the JAX-RS2 resources and model classes by discipline alone. Swagger Core instead derives the specification from the annotations and Java types that already define the service, so the published description is produced from the implementation rather than maintained next to it. For a JAX-RS2 service, that replaces the hand-maintained OpenAPI document as the source of truth. Teams still on Swagger Core 1.5.X and OpenAPI 2.0 are directed to the separate 1.5 branch, which is maintained apart from the 2.x line.

Key capabilities

  • Generates OpenAPI 3.x specifications from JAX-RS2 annotated resources and Java model classes.
  • Supports OpenAPI 3.1 as of version 2.2.0.
  • Handles both the javax and jakarta namespaces, with a parallel artifact set bearing the -jakarta suffix since version 2.1.7.
  • Publishes to Maven Central under the coordinates io.swagger.core.v3/swagger-project.
  • Ships examples and server integrations in the same repository as the core library.
  • Maintains a steady versioned release line, with 2.2.55 as the current stable tag following 2.2.54, 2.2.53, and earlier tags, all marked Supported.
  • Keeps a documented compatibility path to the 1.5 branch for OpenAPI 2.0 users.

Who uses it and how

  • Java teams running JAX-RS2 services in the javax namespace add the unsuffixed artifacts and get a generated OpenAPI 3.x description of their existing resources.
  • Teams that have moved to the Jakarta namespace use the parallel -jakarta artifacts rather than adapting the javax set.
  • API platform groups that need a published specification produced from the service code use Swagger Core instead of maintaining the document by hand.
  • Projects already on OpenAPI 3.1 adopt versions from 2.2.0 onward, while OpenAPI 2.0 projects remain on the 1.5 branch.
  • The project carries 7,529 stars and 2,259 forks, indicating a broad base of Java contributors and dependents rather than a single-vendor effort.

Getting started

Add the Maven Central artifact io.swagger.core.v3/swagger-project to a JAX-RS2 project. The project's getting-started guide on the GitHub wiki, under Swagger-2.X---Getting-started, covers the initial setup, and the wiki holds documentation and samples.

How it compares

The facts provided name no competing or paid products, so Swagger Core stands alone in this registry. It is a library embedded in a Java application rather than a hosted service, so there is no vendor account, subscription, or data-ownership question attached to it beyond the Apache-2.0 licence.

When to use it — and when not to

Swagger Core is worth adopting when the service is Java and JAX-RS2 and the team wants the OpenAPI description generated from the code. It is not a fit for non-Java stacks, for services that do not use JAX-RS2, or for teams that want a standalone specification editor rather than a generation library. Two honest caveats: the README is deliberately minimal and pushes almost all documentation to the GitHub wiki and the swagger.io site, so onboarding depends on material outside the repository, and the tracker carries 197 open issues, which is worth reviewing against your use case before committing.

project readme (upstream, from github) — read inline

Swagger Core

NOTE: If you're looking for Swagger Core 1.5.X and OpenAPI 2.0, please refer to 1.5 branch.

NOTE: Since version 2.1.7, Swagger Core also supports the Jakarta namespace. There are a parallel set of artifacts with the -jakarta suffix, providing the same functionality as the unsuffixed (i.e.: javax) artifacts. Please see the Wiki for more details.

NOTE: Since version 2.2.0 Swagger Core supports OpenAPI 3.1; see this page for details

Build Test Deploy Maven Central

Swagger Core is a Java implementation of the OpenAPI Specification. Current version supports JAX-RS2 (javax and jakarta namespaces).

Get started with Swagger Core!

See the guide on getting started with Swagger Core to get started with adding Swagger to your API.

See the Wiki!

The github wiki contains documentation, samples, contributions, etc. Start there.

Compatibility

The OpenAPI Specification has undergone several revisions since initial creation in 2010. The Swagger Core project has the following compatibilities with the OpenAPI Specification:

Swagger core Version Release Date OpenAPI Spec compatibility Notes Status
2.2.55 (current stable) 2026-08-31 3.x tag v2.2.55 Supported
2.2.54 2026-08-18 3.x tag v2.2.54 Supported
2.2.53 2026-08-03 3.x tag v2.2.53 Supported
2.2.52 2026-06-22 3.x tag v2.2.52 Supported
2.2.51 2026-06-12 3.x tag v2.2.51 Supported
2.2.50 2026-05-12 3.x tag v2.2.50 Supported
2.2.49 2026-04-28 3.x tag v2.2.49 Supported
2.2.48 2026-04-13 3.x tag v2.2.48 Supported
2.2.47 2026-04-09 3.x tag v2.2.47 Supported
2.2.46 2026-03-31 3.x tag v2.2.46 Supported
2.2.45 2026-03-09 3.x tag v2.2.45 Supported
2.2.44 2026-03-03 3.x tag v2.2.44 Supported
2.2.43 2026-02-17 3.x tag v2.2.43 Supported
2.2.42 2026-01-19 3.x tag v2.2.42 Supported
2.2.41 2025-11-24 3.x tag v2.2.41 Supported
2.2.40 2025-10-28 3.x tag v2.2.40 Supported
2.2.39 2025-10-13 3.x tag v2.2.39 Supported
2.2.38 2025-09-29 3.x tag v2.2.38 Supported
2.2.37 2025-09-16 3.x tag v2.2.37 Supported
2.2.36 2025-08-18 3.x tag v2.2.36 Supported
2.2.35 2025-07-31 3.x tag v2.2.35 Supported
2.2.34 2025-06-20 3.x tag v2.2.34 Supported
2.2.33 2025-06-12 3.x tag v2.2.33 Supported
2.2.32 2025-05-14 3.x tag v2.2.32 Supported
2.2.31 2025-05-13 3.x tag v2.2.31 Supported
2.2.30 2025-04-07 3.x tag v2.2.30 Supported
2.2.29 2025-03-10 3.x tag v2.2.29 Supported
2.2.28 2025-01-16 3.x tag v2.2.28 Supported
2.2.27 2024-12-11 3.x tag v2.2.27 Supported
2.2.26 2024-11-18 3.x tag v2.2.26 Supported
2.2.25 2024-10-02 3.x tag v2.2.25 Supported
2.2.24 2024-09-23 3.x tag v2.2.24 Supported
2.2.23 2024-08-28 3.x tag v2.2.23 Supported
2.2.22 2024-05-15 3.x tag v2.2.22 Supported
2.2.21 2024-03-20 3.x tag v2.2.21 Supported
2.2.20 2023-12-19 3.x tag v2.2.20 Supported
2.2.19 2023-11-10 3.x tag v2.2.19 Supported
2.2.18 2023-10-25 3.x tag v2.2.18 Supported
2.2.17 2023-10-12 3.x tag v2.2.17 Supported
2.2.16 2023-09-18 3.x tag v2.2.16 Supported
2.2.15 2023-07-08 3.x tag v2.2.15 Supported
2.2.14 2023-06-26 3.x tag v2.2.14 Supported
2.2.13 2023-06-24 3.x tag v2.2.13 Supported
2.2.12 2023-06-13 3.x tag v2.2.12 Supported
2.2.11 2023-06-01 3.x tag v2.2.11 Supported
2.2.10 2023-05-15 3.x tag v2.2.10 Supported
2.2.9 2023-03-20 3.x tag v2.2.9 Supported
2.2.8 2023-01-06 3.x tag v2.2.8

readme truncated — read the full docs on github

Frequently asked questions

Is swagger-core free to use?

swagger-core is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does swagger-core do?

Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API

What is swagger-core written in?

swagger-core is primarily written in Java. Its source is publicly available at https://github.com/swagger-api/swagger-core, and it has 7,530 GitHub stars.