springdoc-openapi icon indicating copy to clipboard operation
springdoc-openapi copied to clipboard

[Spring Boot 4] Jackson 3 ObjectMapper

Open jkstrauss opened this issue 2 months ago • 1 comments

Currently, Springdoc 3.0.0, which supports Spring Boot 4 (which in turn favors Jackson 3 over Jackson 2) is using Jackson 2.

This is not desired for the following reasons

  • It requires having the Jackson 2 on the classpath
  • It requires any schema customization to be done in Jackson 2 instead of the more modern Jackson 3.

It would be nice if you could remove the need to have Jackson 2

  • In previous versions Jackson allowed mutating the mapper, and Springdoc's mapper is available using Json.mapper()
    • This will not be possible anymore with Jackson 3, so some API would be necessary to allow customization

jkstrauss avatar Dec 10 '25 21:12 jkstrauss

This is related to an underlying dependency. See answer from project maintainer https://github.com/springdoc/springdoc-openapi/issues/3157#issuecomment-3620878833 and the swagger-core issue https://github.com/swagger-api/swagger-core/issues/4991.

Mattias-Sehlstedt avatar Dec 11 '25 11:12 Mattias-Sehlstedt