Repository navigation
Releases
springdoc-openapi v3.2.1 released!
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-jakartaandswagger-core-jakartabecomeswagger-annotations,swagger-modelsandswagger-core. Update the dependencies you declare explicitly. - Jackson 3 mappers are immutable: customize the swagger-core mappers with
ObjectMapperFactory.addCustomizerinstead of changingJson.mapper()orJson31.mapper(). - Getters starting with an acronym keep its case, as Jackson 3 serializes them:
getETag()is documented asETaginstead ofetag. - The parameter of a single public constructor whose name matches no property is documented as a
writeOnlyproperty.
- The swagger artifacts are renamed:
- Spring Boot 4.2 and proxies: Spring Boot 4.2 ignores
X-Forwarded-Prefixby default. Behind a proxy that sets it, enableserver.request.header.forwarded.use-prefix=trueso that the Swagger UI and Scalar URLs keep the prefix.server.forward-headers-strategyis deprecated in favor ofserver.request.header.forwarded.strategy. If your proxy sends the host in the standardForwardedheader and the prefix inX-Forwarded-Prefix, see the changelog. - Spring Data REST (#3429): an association to an entity without an exported repository uses the
<Name>Responseschema consistently, also when it is nullable, and an entity whose@Schema(name)differs from its class name gets its associations filtered as well.
New
requiredproperties ofkotlinx.serialization@Serializableclasses are derived whenjackson-module-kotlinis absent (#3433). Disable withspringdoc.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/StringNodeare documented as an array and a string (#3431). @Schema(example)onDuration,LocalTimeandOffsetTimeis kept as declared (#3442).- A subtype keeps its
allOfreference 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
@JsonPropertyor@JsonNamingis 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
@JsonUnwrappedmember no longer adds an empty property.
Security
- Vulnerabilities in the DOMPurify bundled with swagger-ui (GHSA-cg2g-xh64-v4q7, GHSA-mrv2-3pqr-j5jr, GHSA-c6gr-qvv4-5v3f), addressed by upgrading swagger-ui to 5.35.1 (DOMPurify 3.4.17).
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!
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>Responseschema consistently, also when it is nullable, and an entity whose@Schema(name)differs from its class name gets its associations filtered as well.
New
requiredproperties ofkotlinx.serialization@Serializableclasses are derived whenjackson-module-kotlinis absent (#3433). Disable withspringdoc.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
ArrayNodeandTextNodeare documented as an array and a string (#3431).- A subtype keeps its
allOfreference 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
@JsonPropertyor@JsonNamingis marked nullable (#3399). - The deprecated annotations registry is thread safe (#3402).
- Validation constraints are documented without Hibernate Validator on the classpath (#3405).
Security
- Vulnerabilities in the DOMPurify bundled with swagger-ui (GHSA-cg2g-xh64-v4q7, GHSA-mrv2-3pqr-j5jr, GHSA-c6gr-qvv4-5v3f), addressed by upgrading swagger-ui to 5.35.1 (DOMPurify 3.4.17).
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!
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/PageMetadataproperties and theamount/currencyproperties ofMonetaryAmountare 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/nameto#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.mavenon the classpath and don't want it, setscalar.enabled=false.
New
- Opt-in nullability for Java models (#3382):
springdoc.model-converters.java-nullable-property-customizer.enabled=truemarks properties annotated with@Nullable(JSpecify, Spring, JSR-305) as nullable, including$refandoneOfproperties, without changing shared components. - Polymorphic
oneOfas reusable components (#3390):springdoc.model-converters.polymorphic-converter.one-of-as-ref=true, with the name suffix set byspringdoc.model-converters.polymorphic-converter.one-of-ref-suffix(Variantby default). ParameterCustomizercan read type-use annotations, including insideOptional<@MyAnnotation Foo>(#3370).- MCP tools are registered with a
McpStatelessSyncServer, for the Spring AI STATELESS protocol (#3388).
Fixed
@ResponseStatuson a controller class is applied to its operations (#3352).- An injected
WebSessionis 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
LinkRelationProviderbean (#3364). WebAsyncTaskreturn types are unwrapped (#3368).- A JSpecify
@Nullableon 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!
Spring Boot 3.5.x line (built on Spring Boot 3.5.16).
⚠️ Changes you may notice
- Newly required properties (#3360, #3361): the
PagedModel/PageMetadataproperties and theamount/currencyproperties ofMonetaryAmountare 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/nameto#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.mavenon the classpath and don't want it, setscalar.enabled=false.
New
- Opt-in nullability for Java models (#3382):
springdoc.model-converters.java-nullable-property-customizer.enabled=truemarks properties annotated with@Nullable(JSpecify, Spring, JSR-305) as nullable, including$refandoneOfproperties, without changing shared components. - Polymorphic
oneOfas reusable components (#3390):springdoc.model-converters.polymorphic-converter.one-of-as-ref=true, with the name suffix set byspringdoc.model-converters.polymorphic-converter.one-of-ref-suffix(Variantby default). ParameterCustomizercan read type-use annotations, including insideOptional<@MyAnnotation Foo>(#3370).
Fixed
@ResponseStatuson a controller class is applied to its operations (#3352).- An injected
WebSessionis 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
LinkRelationProviderbean (#3364). WebAsyncTaskreturn types are unwrapped (#3368).- A JSpecify
@Nullableon 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!
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
ThreadLocalcan 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
JsonNullablevalues 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-exampleandspringdoc.login-endpoint.password-exampleto document the Spring Security login endpoint
Changed
- MCP is now opt-in. Set
springdoc.ai.mcp.enabled=true, andspringdoc.ai.mcp.dashboard-enabled=truefor the dashboard - The Scalar starters no longer register forwarded-header handling. Set
server.forward-headers-strategy=framework(ornative) behind a trusted proxy - Add
springdoc.cache.max-entries(default100) to bound the per-locale OpenAPI cache - Add
springdoc.ai.mcp.audit.redact(defaulttrue) 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,LocalTimeandOffsetTimeare now resolved by swagger-core instead of being forced to a barestring, so they carry aformat(durationandpartial-timerespectively for the first two) - A property whose type only implements
Setindirectly (LinkedHashSet,TreeSet, …) is now described withuniqueItems: 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-docsfails with aNullPointerExceptionwhen spring-hateoas is on the classpath withoutHateoasProperties - #3314 –
Json Processing Exception occurredis logged for every constrained parameter whose schema is not aJsonSchema - #3317 – An injected
HttpHeadersparameter is described as a schema - #3332 – The properties a Kotlin entity inherits from an
@Embeddableare missing from the Spring Data REST schemas - #3320 –
@OrderandOrderedignored when applying customizers - #3319 – A
Pagenested in another schema is not replaced byPagedModel - #3313 – Springdoc auto-configurations rely on unspecified auto-configuration ordering
- #3331 – Validation annotations declared inside
Optionalparameters are dropped - #3322 – Validation annotations on a container's type argument leak between parameters
- #3315 – An OAS 3.1
JsonSchemacannot be cloned through JSON - #3300 – TYPE_USE annotations on
@ParameterObjectfields are not passed along - #3341 – Stabilize Spring Data
SortandPageableschema property order - #3338 – Kotlin nullability interpretation of the
Any?type - #3136 – A Spring Data REST association to a non-exported entity expands its
@EmbeddedIdand@MapsIdfields recursively in the response schemas - The Spring Data REST response post-processing rewrote an association property in place, so the
…Responserefs could leak into the schema shared with the request body representation
New Contributors
- @king-407 made their first contribution in #3330
- @jjh75607 made their first contribution in #3335
- @kuglo made their first contribution in #3342
- @kdelay made their first contribution in #3316
- @exijn made their first contribution in #3334
Full Changelog: v3.1.0...v3.1.1
springdoc-openapi v2.9.1 released!
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
JsonNullablevalues 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-exampleandspringdoc.login-endpoint.password-exampleto document the Spring Security login endpoint
Changed
- The Scalar starters no longer register forwarded-header handling. Set
server.forward-headers-strategy=framework(ornative) behind a trusted proxy - Add
springdoc.cache.max-entries(default100) to bound the per-locale OpenAPI cache - Document the security policy and the release versioning scheme
- #3351 –
java.time.Duration,LocalTimeandOffsetTimeare now resolved by swagger-core instead of being forced to a barestring, so they carry aformat(durationandpartial-timerespectively for the first two) - A property whose type only implements
Setindirectly (LinkedHashSet,TreeSet, …) is now described withuniqueItems: 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 –
@OrderandOrderedignored when applying customizers - #3319 – A
Pagenested in another schema is not replaced byPagedModel - #3313 – Springdoc auto-configurations rely on unspecified auto-configuration ordering
- #3331 – Validation annotations declared inside
Optionalparameters are dropped - #3322 – Validation annotations on a container's type argument leak between parameters
- #3315 – An OAS 3.1
JsonSchemacannot be cloned through JSON - #3314 –
Json Processing Exception occurredis logged for every constrained parameter whose schema is not aJsonSchema - #3300 – TYPE_USE annotations on
@ParameterObjectfields are not passed along - #3341 – Stabilize Spring Data
SortandPageableschema property order - #3338 – Kotlin nullability interpretation of the
Any?type - #3332 – The properties a Kotlin entity inherits from an
@Embeddableare missing from the Spring Data REST schemas - #3136 – A Spring Data REST association to a non-exported entity expands its
@EmbeddedIdand@MapsIdfields recursively in the response schemas - The Spring Data REST response post-processing rewrote an association property in place, so the
…Responserefs could leak into the schema shared with the request body representation - #3317 – Ignore an injected
HttpHeadersparameter explicitly. The reported failure needs Spring Framework 7, whereHttpHeadersstopped implementingMultiValueMap; on this line it is still covered by theMapentry of the ignore list, so this is regression cover rather than a behaviour change - Harden the Spring Data REST response post-processing against an
_embeddedschema that carries no properties
New Contributors
- @tthornton3-chwy made their first contribution in #3300
Full Changelog: v2.9.0...v2.9.1
springdoc-openapi v3,1,0 released!
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
nullablefor 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
WebPropertiesandWebMvcPropertiesoptional inSwaggerConfig - #3284 – Upgrade swagger-core from version 2.2.48 to 2.2.49
- #3282 – Preserve version from
nest()predicate across all routes innest - #3281 – Stabilize Spring Data
Pageschema property order - #3274 – Description disappears from the generated json after upgrade to 3.0.3
- #3270 – Validation annotation of
ParameterObjectproperty applied toPathVariablewith 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
Mapnot allowed in JSON
Full Changelog: v3.0.3...v3.1.0
springdoc-openapi v2.9.0 released!
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
- Make WebProperties and WebMvcProperties optional in SwaggerConfig by @seonwooj0810 in #3292
- chore: act upon SonarQube warnings by @Mattias-Sehlstedt in #3306
- 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
nullablefor 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
WebPropertiesandWebMvcPropertiesoptional inSwaggerConfig - #3281 – Stabilize Spring Data
Pageschema property order - #3274 – Description disappears from the generated JSON after upgrade to 3.0.3
- #3270 – Validation annotation of
ParameterObjectproperty applied toPathVariablewith the same name, even in unrelated endpoints - #3263 – Null key for a
Mapnot allowed in JSON - #3262 – Fix version mismatch in
springdoc-openapi-testsmodules
New Contributors
- @ankushsurani made their first contribution in #3262
- @0xabadea made their first contribution in #3269
- @dpkass made their first contribution in #3281
- @Axel-1 made their first contribution in #3291
Full Changelog: v2.8.17...v2.9.0
springdoc-openapi v3.0.3 released!
Added
- #3246 – Add Springdoc OpenAPI MCP (Model Context Protocol) support
- #3256 – Auto-set
nullable: truefor Kotlin nullable types in schema properties - #3239 – Add support for the
@Rangeconstraint 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)inSpringDocHateoasConfiguration - Forwards all MCP non-transport headers to downstream methods
- Dynamically resolve the base path from
window.location.pathnamefor 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 –
Directionenum: fixed visibility scope of group order so thatsetGroupsOrdermethod 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 –
PropertyResolverUtilsretains aJsonNodewhen reading anExtensionPropertyannotation - #3226 – Propagate
JsonViewcontext when resolvingPage<T>schema
New Contributors
- @seregamorph made their first contribution in #3260
Full Changelog: v3.0.2...v3.0.3
springdoc-openapi v2.8.17 released!
Added
- Add support for the
@Rangeconstraint validation annotation - Auto-set
nullable: truefor 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
$refnullable 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
@ControllerAdviceare still nondeterministic across OS - #3236 – Preserve YAML group URLs in Swagger UI
- Fix
PropertyResolverUtilsto retain aJsonNodewhen reading anExtensionPropertyannotation - Fix handling of default values for
LocalDate
New Contributors
- @soowanx made their first contribution in #3247
- @pcalouche made their first contribution in #3254
- @sisco70 made their first contribution in #3255
- @thejeff77 made their first contribution in #3256
- @mcclellanmj made their first contribution in #3259
Full Changelog: v2.8.16...v2.8.17