Skip to content

Releases

springdoc-openapi v3.2.1 released!

Choose a tag to compare

@bnasslahsen bnasslahsen released this 20 Nov 20:17

Spring Boot 4.2.x line (built on Spring Boot 4.2.0).

⚠️ Changes you may notice

  • swagger-core 3.0 and Jackson 3: springdoc-openapi now runs on swagger-core 3.0.0, so the Jackson mappers of springdoc-openapi and swagger-core are Jackson 3 (tools.jackson) mappers.
    • The swagger artifacts are renamed: swagger-annotations-jakarta, swagger-models-jakarta and swagger-core-jakarta become swagger-annotations, swagger-models and swagger-core. Update the dependencies you declare explicitly.
    • Jackson 3 mappers are immutable: customize the swagger-core mappers with ObjectMapperFactory.addCustomizer instead of changing Json.mapper() or Json31.mapper().
    • Getters starting with an acronym keep its case, as Jackson 3 serializes them: getETag() is documented as ETag instead of etag.
    • The parameter of a single public constructor whose name matches no property is documented as a writeOnly property.
  • Spring Boot 4.2 and proxies: Spring Boot 4.2 ignores X-Forwarded-Prefix by default. Behind a proxy that sets it, enable server.request.header.forwarded.use-prefix=true so that the Swagger UI and Scalar URLs keep the prefix. server.forward-headers-strategy is deprecated in favor of server.request.header.forwarded.strategy. If your proxy sends the host in the standard Forwarded header and the prefix in X-Forwarded-Prefix, see the changelog.
  • Spring Data REST (#3429): an association to an entity without an exported repository uses the <Name>Response schema consistently, also when it is nullable, and an entity whose @Schema(name) differs from its class name gets its associations filtered as well.

New

  • required properties of kotlinx.serialization @Serializable classes are derived when jackson-module-kotlin is absent (#3433). Disable with springdoc.model-converters.kotlinx-serialization-required-property-customizer.enabled=false.
  • An application can override the swagger-ui webjar version: springdoc-openapi serves the version found on the classpath, without springdoc.swagger-ui.version.

Fixed

  • Schemas containing a Jackson 3 node are no longer dropped, and ArrayNode / StringNode are documented as an array and a string (#3431).
  • @Schema(example) on Duration, LocalTime and OffsetTime is kept as declared (#3442).
  • A subtype keeps its allOf reference to its polymorphic parent when a controller repeats an annotation of its interface, such as @Valid (#3393).
  • OpenAPI 3.1 schemas are cloned correctly when swagger-core resolved a schema before springdoc-openapi configured its mapper (#3395).
  • WebFlux applications document their parameters with their own conversion service on Spring Boot 4 (#3397).
  • A property-level @Schema(oneOf) narrows only its own subtypes (#3398).
  • A nullable Kotlin property renamed with @JsonProperty or @JsonNaming is marked nullable (#3399).
  • The deprecated annotations registry is thread safe (#3402).
  • Validation constraints are documented without Hibernate Validator on the classpath (#3405).
  • MCP tools: repeated references and OpenAPI 3.1 type arrays are kept in the input schema (#3425, #3427), and the tools are registered with grouped API docs, a disabled cache, or without the default API docs (#3434, #3441).
  • With OpenAPI 3.1, a required @JsonUnwrapped member no longer adds an empty property.

Security

Dependencies

Spring Boot 4.2.0 · swagger-core 3.0.0 · swagger-ui 5.35.1 · Scalar 0.8.0 · Spring AI 2.0.2 · Spring Cloud Function 5.0.5

Thanks to all the contributors of this release: @kuglo, @jochenberger, @Shubchynskyi, @sharanggupta, @aswinalfarizi, @mariodavid, @vietdungnguyen2005, @gwr0-0.

springdoc-openapi v2.10.1 released!

Choose a tag to compare

@bnasslahsen bnasslahsen released this 20 Nov 20:17

Spring Boot 3.5.x line (built on Spring Boot 3.5.16).

⚠️ Changes you may notice

  • Spring Data REST (#3429): an association to an entity without an exported repository uses the <Name>Response schema consistently, also when it is nullable, and an entity whose @Schema(name) differs from its class name gets its associations filtered as well.

New

  • required properties of kotlinx.serialization @Serializable classes are derived when jackson-module-kotlin is absent (#3433). Disable with springdoc.model-converters.kotlinx-serialization-required-property-customizer.enabled=false.
  • An application can override the swagger-ui webjar version: springdoc-openapi serves the version found on the classpath, without springdoc.swagger-ui.version.

Fixed

  • ArrayNode and TextNode are documented as an array and a string (#3431).
  • A subtype keeps its allOf reference to its polymorphic parent when a controller repeats an annotation of its interface, such as @Valid (#3393).
  • OpenAPI 3.1 schemas are cloned correctly when swagger-core resolved a schema before springdoc-openapi configured its mapper (#3395).
  • A property-level @Schema(oneOf) narrows only its own subtypes (#3398).
  • A nullable Kotlin property renamed with @JsonProperty or @JsonNaming is marked nullable (#3399).
  • The deprecated annotations registry is thread safe (#3402).
  • Validation constraints are documented without Hibernate Validator on the classpath (#3405).

Security

Dependencies

Spring Boot 3.5.16 · swagger-core 2.2.55 · swagger-ui 5.35.1 · Scalar 0.8.0 · Spring Cloud Function 4.3.4

Thanks to all the contributors of this release: @kuglo, @jochenberger, @Shubchynskyi, @aswinalfarizi, @gwr0-0.

springdoc-openapi v3.2.0 released!

Choose a tag to compare

@bnasslahsen bnasslahsen released this 24 Oct 14:42

Spring Boot 4.1.x line (built on Spring Boot 4.1.2).

⚠️ Changes you may notice

  • Default API version (#3354): the default API version is now only listed in the version header or query parameter of the operations that actually serve it (a handler mapped to it, or one without a version). Operations mapped only to other versions no longer show it as an allowed value or as their default. This also fixes the HTTP 500 raised when the version parameter declared @Schema(allowableValues).
  • Newly required properties (#3360, #3361): the PagedModel / PageMetadata properties and the amount / currency properties of MonetaryAmount are now marked as required, as they are always serialized. Generated clients will see them as non-nullable.
  • Scalar 0.6 (#3359): upgraded to 0.6.83. The first tag is now open by default, and model links changed from #model/name to #models/Name.
  • Scalar's standalone integration (#3387): with the Swagger UI or API-only starters, Scalar's own auto-configuration is no longer disabled by springdoc. If you have com.scalar.maven on the classpath and don't want it, set scalar.enabled=false.

New

  • Opt-in nullability for Java models (#3382): springdoc.model-converters.java-nullable-property-customizer.enabled=true marks properties annotated with @Nullable (JSpecify, Spring, JSR-305) as nullable, including $ref and oneOf properties, without changing shared components.
  • Polymorphic oneOf as reusable components (#3390): springdoc.model-converters.polymorphic-converter.one-of-as-ref=true, with the name suffix set by springdoc.model-converters.polymorphic-converter.one-of-ref-suffix (Variant by default).
  • ParameterCustomizer can read type-use annotations, including inside Optional<@MyAnnotation Foo> (#3370).
  • MCP tools are registered with a McpStatelessSyncServer, for the Spring AI STATELESS protocol (#3388).

Fixed

  • @ResponseStatus on a controller class is applied to its operations (#3352).
  • An injected WebSession is no longer documented as a query parameter in WebFlux (#3355).
  • The application no longer fails to start with Spring HATEOAS on the classpath but no LinkRelationProvider bean (#3364).
  • WebAsyncTask return types are unwrapped (#3368).
  • A JSpecify @Nullable on a controller parameter makes its schema nullable (#3377).
  • Nullable Kotlin properties described by a oneOf (e.g. sealed classes) are documented as nullable (#3381).
  • Gradle builds no longer lift Jackson 2 above the version managed by Spring Boot (#3373).

Security

  • The MCP dashboard no longer pre-fills the OAuth2 token endpoint, client id and client secret, and warns when the token endpoint is not HTTPS.

Dependencies

Spring Boot 4.1.2 · swagger-ui 5.34.0 · Scalar 0.6.83 · Spring AI 2.0.1 · Spring Cloud Function 5.0.5 · spring-security-oauth2-authorization-server managed by Spring Boot (7.1.2)

Thanks to all the contributors of this release: @MaxFreedomPollard, @kdelay, @arimu1, @dpkass, @anupamchaubey, @Mattias-Sehlstedt, @Naresh7175, @ys0v9, @sharanggupta, @itd-sw, @gwr0-0, @Tework123, @awinishere.

springdoc-openapi v2.10.0 released!

Choose a tag to compare

@bnasslahsen bnasslahsen released this 24 Oct 14:42

Spring Boot 3.5.x line (built on Spring Boot 3.5.16).

⚠️ Changes you may notice

  • Newly required properties (#3360, #3361): the PagedModel / PageMetadata properties and the amount / currency properties of MonetaryAmount are now marked as required, as they are always serialized. Generated clients will see them as non-nullable.
  • Scalar 0.6 (#3359): upgraded to 0.6.83. The first tag is now open by default, and model links changed from #model/name to #models/Name.
  • Scalar's standalone integration (#3387): with the Swagger UI or API-only starters, Scalar's own auto-configuration is no longer disabled by springdoc. If you have com.scalar.maven on the classpath and don't want it, set scalar.enabled=false.

New

  • Opt-in nullability for Java models (#3382): springdoc.model-converters.java-nullable-property-customizer.enabled=true marks properties annotated with @Nullable (JSpecify, Spring, JSR-305) as nullable, including $ref and oneOf properties, without changing shared components.
  • Polymorphic oneOf as reusable components (#3390): springdoc.model-converters.polymorphic-converter.one-of-as-ref=true, with the name suffix set by springdoc.model-converters.polymorphic-converter.one-of-ref-suffix (Variant by default).
  • ParameterCustomizer can read type-use annotations, including inside Optional<@MyAnnotation Foo> (#3370).

Fixed

  • @ResponseStatus on a controller class is applied to its operations (#3352).
  • An injected WebSession is no longer documented as a query parameter in WebFlux (#3355).
  • The application no longer fails to start with Spring HATEOAS on the classpath but no LinkRelationProvider bean (#3364).
  • WebAsyncTask return types are unwrapped (#3368).
  • A JSpecify @Nullable on a controller parameter makes its schema nullable (#3377).
  • Nullable Kotlin properties described by a oneOf (e.g. sealed classes) are documented as nullable (#3381).
  • Gradle builds no longer lift Jackson 2 above the version managed by Spring Boot (#3373).

Dependencies

swagger-ui 5.34.0 · Scalar 0.6.83 · Spring Cloud Function 4.2.4 · commons-lang3 3.21.0

Thanks to all the contributors of this release: @MaxFreedomPollard, @kdelay, @dpkass, @anupamchaubey, @Mattias-Sehlstedt, @Naresh7175, @ys0v9, @sharanggupta, @itd-sw, @Tework123, @awinishere.

springdoc-openapi v3.1.1 released!

Choose a tag to compare

@bnasslahsen bnasslahsen released this 06 Sep 19:56

Security

  • GHSA-6f5m-mhjg-qwxq – MCP tool callbacks do not encode path parameters, allowing request retargeting
  • GHSA-4v2q-56v7-2cpw – MCP transport, admin and dashboard endpoints are exposed by default
  • GHSA-m4cg-mhpg-rh2r – MCP audit events record credentials and request/response bodies without redaction
  • GHSA-5f9r-4mc4-qh3c – Unbounded MCP pending-confirmation store allows memory exhaustion
  • GHSA-jcgg-59c8-w4wh – MCP request context in a ThreadLocal can leak headers between concurrent WebFlux requests
  • GHSA-rhhx-6j8h-8cvw – Unbounded per-locale OpenAPI cache allows memory exhaustion via Accept-Language
  • GHSA-c925-vm88-mpp9 – Scalar starters trust client-supplied forwarded headers and render from a shared mutable bean
  • CVE-2026-75838 – Cross-site scripting in the DOMPurify bundled with swagger-ui, addressed by upgrading swagger-ui to 5.32.14

Added

  • #3340 – Describe JsonNullable values without their Java wrapper
  • #3325 – Manage the swagger artifacts in springdoc-openapi-bom, so that modules holding only the annotations stay in lockstep
  • #3321 – Add springdoc.login-endpoint.username-example and springdoc.login-endpoint.password-example to document the Spring Security login endpoint

Changed

  • MCP is now opt-in. Set springdoc.ai.mcp.enabled=true, and springdoc.ai.mcp.dashboard-enabled=true for the dashboard
  • The Scalar starters no longer register forwarded-header handling. Set server.forward-headers-strategy=framework (or native) behind a trusted proxy
  • Add springdoc.cache.max-entries (default 100) to bound the per-locale OpenAPI cache
  • Add springdoc.ai.mcp.audit.redact (default true) to mask secrets in MCP audit events
  • Document that the MCP approval flow is a confirmation step, not an authorization control
  • Document the security policy and the release versioning scheme
  • #3351 – java.time.Duration, LocalTime and OffsetTime are now resolved by swagger-core instead of being forced to a bare string, so they carry a format (duration and partial-time respectively for the first two)
  • A property whose type only implements Set indirectly (LinkedHashSet, TreeSet, …) is now described with uniqueItems: true, following swagger-api/swagger-core#5265
  • Upgrade swagger-core to version 2.2.55
  • Upgrade swagger-ui to version 5.32.14

Fixed

  • #3328, #3337 – /v3/api-docs fails with a NullPointerException when spring-hateoas is on the classpath without HateoasProperties
  • #3314 – Json Processing Exception occurred is logged for every constrained parameter whose schema is not a JsonSchema
  • #3317 – An injected HttpHeaders parameter is described as a schema
  • #3332 – The properties a Kotlin entity inherits from an @Embeddable are missing from the Spring Data REST schemas
  • #3320 – @Order and Ordered ignored when applying customizers
  • #3319 – A Page nested in another schema is not replaced by PagedModel
  • #3313 – Springdoc auto-configurations rely on unspecified auto-configuration ordering
  • #3331 – Validation annotations declared inside Optional parameters are dropped
  • #3322 – Validation annotations on a container's type argument leak between parameters
  • #3315 – An OAS 3.1 JsonSchema cannot be cloned through JSON
  • #3300 – TYPE_USE annotations on @ParameterObject fields are not passed along
  • #3341 – Stabilize Spring Data Sort and Pageable schema property order
  • #3338 – Kotlin nullability interpretation of the Any? type
  • #3136 – A Spring Data REST association to a non-exported entity expands its @EmbeddedId and @MapsId fields recursively in the response schemas
  • The Spring Data REST response post-processing rewrote an association property in place, so the …Response refs could leak into the schema shared with the request body representation

New Contributors

Full Changelog: v3.1.0...v3.1.1

springdoc-openapi v2.9.1 released!

Choose a tag to compare

@bnasslahsen bnasslahsen released this 06 Sep 19:56

Security

  • GHSA-rhhx-6j8h-8cvw – Unbounded per-locale OpenAPI cache allows memory exhaustion via Accept-Language
  • GHSA-c925-vm88-mpp9 – Scalar starters trust client-supplied forwarded headers and render from a shared mutable bean
  • CVE-2026-75838 – Cross-site scripting in the DOMPurify bundled with swagger-ui, addressed by upgrading swagger-ui to 5.32.14

Added

  • #3340 – Describe JsonNullable values without their Java wrapper
  • #3325 – Manage the swagger artifacts in springdoc-openapi-bom, so that modules holding only the annotations stay in lockstep
  • #3321 – Add springdoc.login-endpoint.username-example and springdoc.login-endpoint.password-example to document the Spring Security login endpoint

Changed

  • The Scalar starters no longer register forwarded-header handling. Set server.forward-headers-strategy=framework (or native) behind a trusted proxy
  • Add springdoc.cache.max-entries (default 100) to bound the per-locale OpenAPI cache
  • Document the security policy and the release versioning scheme
  • #3351 – java.time.Duration, LocalTime and OffsetTime are now resolved by swagger-core instead of being forced to a bare string, so they carry a format (duration and partial-time respectively for the first two)
  • A property whose type only implements Set indirectly (LinkedHashSet, TreeSet, …) is now described with uniqueItems: true, following swagger-api/swagger-core#5265
  • Upgrade swagger-core to version 2.2.55
  • Upgrade swagger-ui to version 5.32.14

Fixed

  • #3320 – @Order and Ordered ignored when applying customizers
  • #3319 – A Page nested in another schema is not replaced by PagedModel
  • #3313 – Springdoc auto-configurations rely on unspecified auto-configuration ordering
  • #3331 – Validation annotations declared inside Optional parameters are dropped
  • #3322 – Validation annotations on a container's type argument leak between parameters
  • #3315 – An OAS 3.1 JsonSchema cannot be cloned through JSON
  • #3314 – Json Processing Exception occurred is logged for every constrained parameter whose schema is not a JsonSchema
  • #3300 – TYPE_USE annotations on @ParameterObject fields are not passed along
  • #3341 – Stabilize Spring Data Sort and Pageable schema property order
  • #3338 – Kotlin nullability interpretation of the Any? type
  • #3332 – The properties a Kotlin entity inherits from an @Embeddable are missing from the Spring Data REST schemas
  • #3136 – A Spring Data REST association to a non-exported entity expands its @EmbeddedId and @MapsId fields recursively in the response schemas
  • The Spring Data REST response post-processing rewrote an association property in place, so the …Response refs could leak into the schema shared with the request body representation
  • #3317 – Ignore an injected HttpHeaders parameter explicitly. The reported failure needs Spring Framework 7, where HttpHeaders stopped implementing MultiValueMap; on this line it is still covered by the Map entry of the ignore list, so this is regression cover rather than a behaviour change
  • Harden the Spring Data REST response post-processing against an _embedded schema that carries no properties

New Contributors

Full Changelog: v2.9.0...v2.9.1

springdoc-openapi v3,1,0 released!

Choose a tag to compare

@bnasslahsen bnasslahsen released this 01 Aug 21:57

What's Changed

  • Fix request-specific Swagger UI index transformations by @limehee in #3279
  • Fix #3282: preserve nest() version predicate across all routes in nest by @seonwooj0810 in #3296
  • Upgrade Spring Boot to version 4.1.0
  • Upgrade Spring AI to version 2.0.0
  • Upgrade swagger-core to version 2.2.52
  • Upgrade swagger-ui to version 5.32.11
  • #3307 – Act upon SonarQube warnings
  • #3306 – Act upon SonarQube warnings

Added

  • #3269 – Add mechanism to disable nullable for Kotlin properties
  • Allow request-specific Swagger UI index transformation

Fixed

  • #3304 – Kotlin parent class's field is not properly marked as nullable
  • #3294 – Duplicated path getting swagger-config
  • #3293 – Inconsistent OpenAPI schema naming with SNAKE_CASE: some Java record fields remain camelCase
  • #3292 – Make WebProperties and WebMvcProperties optional in SwaggerConfig
  • #3284 – Upgrade swagger-core from version 2.2.48 to 2.2.49
  • #3282 – Preserve version from nest() predicate across all routes in nest
  • #3281 – Stabilize Spring Data Page schema property order
  • #3274 – Description disappears from the generated json after upgrade to 3.0.3
  • #3270 – Validation annotation of ParameterObject property applied to PathVariable with the same name, even in unrelated endpoints
  • #3266 – Upgrade swagger-core from version 2.2.47 to 2.2.48
  • #3263 – Null key for a Map not allowed in JSON

Full Changelog: v3.0.3...v3.1.0

springdoc-openapi v2.9.0 released!

Choose a tag to compare

@bnasslahsen bnasslahsen released this 01 Aug 21:55

What's Changed

  • Fix version mismatch in springdoc-openapi-tests: update sub-modules to 2.8.18-SNAPSHOT by @ankushsurani in #3262
  • Upgrade swagger-core from version 2.2.47 to 2.2.48 by @Mattias-Sehlstedt in #3266
  • Add mechanism to disable nullable for Kotlin properties by @0xabadea in #3269
  • Stabilize Spring Data Page schema property order by @dpkass in #3281
  • Upgrade swagger-core from version 2.2.48 to 2.2.49 by @Mattias-Sehlstedt in #3284
  • Fix vulnerabilities: upgrade spring boot to 3.5.14 and swagger-ui to 5.32.5 by @Axel-1 in #3291
  • Upgrade Spring Boot to version 3.5.16
  • Upgrade swagger-core to version 2.2.52
  • Upgrade swagger-ui to version 5.32.11
  • Upgrade commons-lang to version 3.20.0
  • Act upon SonarQube warnings (#3306, #3307)

Added

  • Allow request-specific Swagger UI index transformation
  • Add a mechanism to disable nullable for Kotlin properties

Fixed

  • #3304 – Kotlin parent class's field is not properly marked as nullable
  • #3298 – Update Spring Boot to 3.5.16
  • #3294 – Duplicated path getting swagger-config
  • #3293 – Inconsistent OpenAPI schema naming with SNAKE_CASE: some Java record fields remain camelCase
  • #3291 – Fix vulnerabilities: upgrade Spring Boot to 3.5.14 and swagger-ui to 5.32.5
  • #3288 – Make WebProperties and WebMvcProperties optional in SwaggerConfig
  • #3281 – Stabilize Spring Data Page schema property order
  • #3274 – Description disappears from the generated JSON after upgrade to 3.0.3
  • #3270 – Validation annotation of ParameterObject property applied to PathVariable with the same name, even in unrelated endpoints
  • #3263 – Null key for a Map not allowed in JSON
  • #3262 – Fix version mismatch in springdoc-openapi-tests modules

New Contributors

Full Changelog: v2.8.17...v2.9.0

springdoc-openapi v3.0.3 released!

Choose a tag to compare

@bnasslahsen bnasslahsen released this 11 Apr 23:51

Added

  • #3246 – Add Springdoc OpenAPI MCP (Model Context Protocol) support
  • #3256 – Auto-set nullable: true for Kotlin nullable types in schema properties
  • #3239 – Add support for the @Range constraint validation annotation
  • #3244 – Handle default values for LocalDate

Changed

  • Upgrade Spring Boot to version 4.0.5
  • Upgrade swagger-core to version 2.2.47
  • Upgrade swagger-ui to version 5.32.2
  • #3260 – @ConditionalOnClass(HateoasProperties.class) in SpringDocHateoasConfiguration
  • Forwards all MCP non-transport headers to downstream methods
  • Dynamically resolve the base path from window.location.pathname for MCP UI

Fixed

  • #3258 – Setting API Version Required when using WebFlux breaks the Swagger UI
  • #3259 – Annotated Generic properties getting applied to sibling properties
  • #3255 – Direction enum: fixed visibility scope of group order so that setGroupsOrder method can be used
  • #3247 – Preserve YAML group URLs in Swagger UI
  • #3245 – Upgrade swagger-core from version 2.2.43 to 2.2.45
  • #3235 – PropertyResolverUtils retains a JsonNode when reading an ExtensionProperty annotation
  • #3226 – Propagate JsonView context when resolving Page<T> schema

New Contributors

Full Changelog: v3.0.2...v3.0.3

springdoc-openapi v2.8.17 released!

Choose a tag to compare

@bnasslahsen bnasslahsen released this 11 Apr 23:51

Added

  • Add support for the @Range constraint validation annotation
  • Auto-set nullable: true for Kotlin nullable types in schema properties

Changed

  • Upgrade Spring Boot to version 3.5.13
  • Upgrade swagger-core to version 2.2.47
  • Upgrade swagger-ui to version 5.32.2

Fixed

  • #3259 – Fix an issue with annotated types with generics on parameters
  • #3255 – Handle $ref nullable wrapping and OAS 3.1 support
  • #3245 – Upgrade swagger-core from 2.2.43 to 2.2.45 (fixes schema resolution issues)
  • #3241 – Generic error responses from multiple @ControllerAdvice are still nondeterministic across OS
  • #3236 – Preserve YAML group URLs in Swagger UI
  • Fix PropertyResolverUtils to retain a JsonNode when reading an ExtensionProperty annotation
  • Fix handling of default values for LocalDate

New Contributors

Full Changelog: v2.8.16...v2.8.17