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.