feat(jackson3): add jackson3 support for Java Client generator - WebClient#23031
Merged
wing328 merged 5 commits intoOpenAPITools:masterfrom Mar 9, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
6 issues found across 860 files
Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed.
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="samples/client/petstore/java/restclient-springBoot4-jackson2/docs/FakeApi.md">
<violation number="1" location="samples/client/petstore/java/restclient-springBoot4-jackson2/docs/FakeApi.md:1007">
P2: The generated example uses `Arrays.asList(-efg)`, which is invalid Java syntax. The enum value "-efg" maps to `EnumClass._EFG`, so the example should reference the enum constant instead of the raw token.</violation>
</file>
<file name="modules/openapi-generator/src/main/resources/Java/libraries/restclient/pom.mustache">
<violation number="1" location="modules/openapi-generator/src/main/resources/Java/libraries/restclient/pom.mustache:351">
P2: When useJackson3 is enabled, the template still includes jackson-databind-nullable, which depends on Jackson 2 (com.fasterxml.jackson.*). This will conflict with Jackson 3’s tools.jackson.* packages and can cause compilation/runtime failures. Guard this dependency for Jackson 3 or provide a compatible alternative.</violation>
</file>
<file name="samples/client/petstore/java/restclient-springBoot4-jackson2/README.md">
<violation number="1" location="samples/client/petstore/java/restclient-springBoot4-jackson2/README.md:100">
P2: README example uses `HttpStatusCodeException` without importing it, so the snippet won’t compile when copied.</violation>
</file>
<file name="samples/client/petstore/java/restclient-springBoot4-jackson2/build.sbt">
<violation number="1" location="samples/client/petstore/java/restclient-springBoot4-jackson2/build.sbt:1">
P2: Invalid comment syntax in build.sbt; '#' is not a Scala comment and will cause sbt parsing to fail.</violation>
</file>
<file name="modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache">
<violation number="1" location="modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache:169">
P2: Jackson 3 createDefaultMapper omits JsonNullableModule registration, so openApiNullable types won’t serialize/deserialize correctly.</violation>
</file>
<file name="modules/openapi-generator/src/main/resources/Java/libraries/restclient/ApiClient.mustache">
<violation number="1" location="modules/openapi-generator/src/main/resources/Java/libraries/restclient/ApiClient.mustache:195">
P2: Jackson3 createDefaultMapper builds a JsonMapper without registering JsonNullableModule when openApiNullable is enabled, unlike the Jackson2 branch. JsonNullable requires its module to be registered to serialize/deserialize nullable fields, so Jackson3-generated clients will mishandle JsonNullable values.</violation>
</file>
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
samples/client/petstore/java/restclient-springBoot4-jackson2/docs/FakeApi.md
Outdated
Show resolved
Hide resolved
modules/openapi-generator/src/main/resources/Java/libraries/restclient/pom.mustache
Outdated
Show resolved
Hide resolved
modules/openapi-generator/src/main/resources/Java/libraries/webclient/ApiClient.mustache
Show resolved
Hide resolved
modules/openapi-generator/src/main/resources/Java/libraries/restclient/ApiClient.mustache
Show resolved
Hide resolved
4b3e61f to
3cdbb71
Compare
wing328
reviewed
Mar 6, 2026
7fea6c1 to
22e948f
Compare
2d6a1df to
f03bda6
Compare
f03bda6 to
726f6c6
Compare
6 tasks
6 tasks
davidricodias
pushed a commit
to davidricodias/openapi-generator
that referenced
this pull request
Mar 11, 2026
…lient (OpenAPITools#23031) * feat(jackson3): add jackson3 support for Java Client generator - WebClient * chore: generate bin/generate-samples.sh bin/configs/java-* * fix: add back FindBugs JSR 305 dependency * chore: generate bin/generate-samples.sh bin/configs/java-* * chore: generate bin/generate-samples.sh bin/configs/java-*
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master(upcoming7.x.0minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)"fixes #22294"present in the PR description)Summary by cubic
Adds Jackson 3 support to the Java WebClient generator with Spring Boot 4, using Spring’s Jackson 3 codecs and Jakarta EE. Includes a new Petstore sample with Maven CI (Java 17/21) and adds it to the JDK17 samples workflow.
New Features
Bug Fixes
Written for commit 726f6c6. Summary will update on new commits.