Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
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
Swagger Core is a Java implementation of the OpenAPI Specification. Current version supports JAX-RS2 (javax and jakarta namespaces).
See the guide on getting started with Swagger Core to get started with adding Swagger to your API.
The github wiki contains documentation, samples, contributions, etc. Start there.
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 | Supported |
| 2.2.7 | 2022-11-15 | 3.0 | tag v2.2.7 | Supported |
| 2.2.6 | 2022-11-02 | 3.0 | tag v2.2.6 | Supported |
| 2.2.5 | 2022-11-02 | 3.0 | tag v2.2.5 | Supported |
| 2.2.4 | 2022-10-16 | 3.0 | tag v2.2.4 | Supported |
| 2.2.3 | 2022-09-27 | 3.0 | tag v2.2.3 | Supported |
| 2.2.2 | 2022-07-20 | 3.0 | tag v2.2.2 | Supported |
| 2.2.1 | 2022-06-15 | 3.0 | tag v2.2.1 | Supported |
| 2.2.0 | 2022-04-04 | 3.0 | tag v2.2.0 | Supported |
| 2.1.13 | 2022-02-07 | 3.0 | tag v2.1.13 | Supported |
| 2.1.12 | 2021-12-23 | 3.0 | tag v2.1.12 | Supported |
| 2.1.11 | 2021-09-29 | 3.0 | tag v2.1.11 | Supported |
| 2.1.10 | 2021-06-28 | 3.0 | tag v2.1.10 | Supported |
| 2.1.9 | 2021-04-20 | 3.0 | tag v2.1.9 | Supported |
| 2.1.8 | 2021-04-18 | 3.0 | tag v2.1.8 | Supported |
| 2.1.7 | 2021-02-18 | 3.0 | tag v2.1.7 | Supported |
| 2.1.6 | 2020-12-04 | 3.0 | tag v2.1.6 | Supported |
| 2.1.5 | 2020-10-01 | 3.0 | tag v2.1.5 | Supported |
| 2.1.4 | 2020-07-24 | 3.0 | tag v2.1.4 | Supported |
| 2.1.3 | 2020-06-27 | 3.0 | [tag v2.1.3](https://github.com/swagger-api/swagger-core/tree/v2.1.3 |
[Feature] Support Jackson 3.x release line
[Bug]: @Size without min drops the minimum set by @NotEmpty or @NotBlank
[Bug]: [swagger-gradle-plugin] ResolveTask execution fails under Gradle 9.7.1+ (Kotlin 2.4.0 internal API accessibility change)
[Bug]: resolveSubtypes() return value is dead code and model.setDiscriminator(null) is a no-op
Consider the @JsonSubTypes for generating the discriminator mapping
[Bug]: @Nullable property mutates shared enumAsRef component schema in OpenAPI 3.1
Jackson annotations ignored on enum class
[Bug]: Explicit @Schema(type = "number"|"integer"|"boolean") is emitted as "string" under OpenAPI 3.1
OutOfMemoryError resolving javax.jcr.Node since 2.2.41 — AnnotatedType.isSubtype in equals()/hashCode() splits the resolver cache
@Schema oneOf config is ignored when generate the api-docs