feat: migrate to jackson 3#5031
Conversation
7633f49 to
7b93974
Compare
changes: - update maven-compiler-plugin to latest 3.14.1 - update maven-javadoc-plugin to latest 3.12.0 - update jacoco-maven-plugin to latest 0.8.14 - set maven.compiler.release to 17 - set source to 17 and update link to javadoc for maven-javadoc-plugin configuration - set java-version to 17 in github workflows - set java version to 17 in swagger-gradle-plugin
0de7198 to
f60ee1e
Compare
|
I have removed many of the changes associated with java 17, so the PR is now much smaller. @cbot59, thanks for the comment! JsonMapper is a descendant of ObjectMapper, so |
|
Hey everyone -- thanks to @vpelikh, we now have Jackson 3 and Java 17 support. But I didn't want to wait, so I have it available here! His branch is available as a dependency, just add this to your build.gradle file or pom.xml equivalent: |
No, it doesn't, because the |
|
Any update on this? |
|
Any chance that a maintainer takes a look here? |
Yes, I’ve had this workaround in use in production for the last 2 weeks: |
This does not work for me: |
|
@daniel-kmiecik @Mattias-Sehlstedt @ewaostrowska, hey! I see you've done the last commits to this repository. Can anyone check out this PR? |
|
Hi @vpelikh, I am only a contributor, so I can unfortunately not do anything to help. But the other two are maintainers and will hopefully assist you. |
|
@MichakrawSB Is there any ETA for this feature? Can we please prioritize this? |
|
It would be really great if you could prioritize this 🙏 |
|
Is this PR not progressing? |
|
Any information on this yet? Will this also make it work with the newest springboot and java 26? |
|
I'm running the current version with latest Spring Boot/Jackson 3 on Java 26 without issues. |
Yes, it works. However, you probably need to add Jackson 2 compatibility support using the deprecated classes. It does work, but it is not an ideal solution. |
|
Is there any plan on merging this or maybe adding this to the next major version instead? |
|
Going to be forced to ditch swagger and find another solution soon 😅
|
|
Hey, any update on this? this has been open since january 1st and there’s a lot of interest here compared to most PRs, but it’s still just sitting in “review required” while multiple releases went out is this actually planned to be merged anytime soon or is it blocked on something? |
No, you don't. Just upgrade Spring Boot and migrate your code to Jackson 3. As long as swagger-core depends on Jackson 2, they will pull it in and just use it. I wonder how many people give up before even trying to do the update. |
I suspect you might not have used certain annotations from the Or you may have added both Jackson 2 and Jackson 3 annotations at the same time during the migration. For example: @tools.jackson.databind.annotation.JsonNaming(tools.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy.class)
@com.fasterxml.jackson.databind.annotation.JsonNaming(com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy.class)
public class SampleVO {If that's the case, it's really a nagging annoyance. |
|
Good point @zqq90, I'm indeed not using any of those. |
|
@ewaostrowska is it possible to prioritize this higher? Alot of teams are waiting for this :) |
|
Hey folks, first of all, thanks for your work and all the continuous improvements — really appreciated. As mentioned earlier, do you have an idea when this fix will be released or merged? At the moment, the available workarounds are quite cumbersome, and we’d really like to remove Jackson 2.x entirely from our codebase if possible. If there’s anything we can help with to speed up the process (testing, feedback, etc.), happy to support. Thanks a lot in advance for your time and help! |
|
I've had this instance running exclusively on Jackson 3 / Spring Boot 4 for the last several months in a large production environment (the same one mentioned above 4 months ago), you're welcome to use it. It's a pretty simple fix and already available: vpelikh/swagger-core@master...WilliamAGH:swagger-core:master |
|
@djankows sorry for being annoying, but we are closer and closer approaching the deprecation of spring boot 3 and we would really like to do the migration :) Alot of people are waiting on this. Do you need any help? |
|
sorry @djankows to re-up the subject but spring boot 3 ends in a month :( |
|
Hey guys, I've gone ahead and proceeded with upgrading to SB4 without this being fixed. I think for most people, it won't be too inconvenient. My setup looks like this: Its annoying, but you simply need to provide a jackson2 mapper to the ModelResolver, only configuring the settings relevant to Swagger (basically just the naming convention). Obviously, if you have tons of custom serialization logic, this might not be practical. |
I think I speak for most people here; we realize theres a work around but supporting multiple versions of jackson isn't really ideal for any of us here. We also recognize that we can simply use jackson 2.x in spring boot apps, but that also seems a bit unsafe as jackson 3 has been out for a year and we're unsure of whether jackson 2 will continue to receive the support that it needs, especially in these times where a CVE pops up every other day. |
|
Hi, I've released Jackson 3 compatible version of all swagger-core dependencies under the group You can find all artifacts here: For example, the <dependency>
<groupId>io.github.vpelikh</groupId>
<artifactId>swagger-core</artifactId>
<version>3.0.0</version>
</dependency>Also if you use <dependency>
<groupId>io.github.vpelikh</groupId>
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
<version>4.0.0</version>
</dependency>Hope this helps while official Jackson 3 support is being worked on! |
|
@djankows Could we get any official clarification on the jackson3 integration? This merge request is already 6months old and it feels like there is zero progress on actually updating to jackson3. Just a small response would be great already :) |

Description
This PR consists of two commits:
Fixes: #4991
Type of Change
Checklist
Screenshots / Additional Context