github springdoc/springdoc-openapi v3.2.1
springdoc-openapi v3.2.1 released!

41 minutes ago

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.

Don't miss a new springdoc-openapi release

NewReleases is sending notifications on new releases.