Repository navigation
feat: add spring-boot4 library with Jackson 3 support - #1438
Open
daniel-kmiecik wants to merge 4 commits into
Open
daniel-kmiecik wants to merge 4 commits into
daniel-kmiecik wants to merge 4 commits into
Conversation
daniel-kmiecik
force-pushed
the
add-spring-boot-4-template-with-jackson-3
branch
from
November 24, 2026 12:45
fbb196b to
46b624c
Compare
djankows
reviewed
Nov 25, 2026
ewaostrowska
approved these changes
Nov 25, 2026
daniel-kmiecik
force-pushed
the
add-spring-boot-4-template-with-jackson-3
branch
from
November 26, 2026 09:52
74ed696 to
ad14446
Compare
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.
Pull Request
Thank you for contributing to swagger-codegen-generators!
Please fill out the following checklist to help us review your PR efficiently.
Description
Summary
Adds an opt-in
spring-boot4library to the Spring generator for Spring Boot 4 / Spring Framework 7. The generated code uses Jackson 3 (tools.jackson.*), which is the default in Spring Boot 4. The default library and the existingspring-boot,spring-boot3andspring-mvcoutputs are not changed by this PR, apart from the shared template andAbstractJavaCodegenedits listed below.What changed
spring-boot4(SpringCodegen,libraries/spring-boot4/): Boot parent,spring-boot-starter-webmvc, springdoc,jackson-databind-nullablewithJsonNullableJackson3Module, and aJacksonModulebean.springBoot4Version:4.0.9or4.1.3, default4.1.3.springBoot4JavaVersion:17or21, default21, written tomaven.compiler.release.4.0.xgets 3.0.3, everything else gets 3.2.0. springdoc 3.2.0 declares support only up to Boot 4.1.x.spring-boot4:java8is always set, since Boot 4 requires Java 17+. Generated API interfaces carry default methods with example code, and controllers stay thin.api,apiController,apiDelegate,model): imports and exception handling use{{jacksonDatabindPackage}}. Onlyspring-boot4sets it totools.jackson. Jackson annotations (com.fasterxml.jackson.annotation.*) stay unchanged, since Jackson 3 uses the same package.AbstractJavaCodegen:jacksonDatabindPackagedefaults tocom.fasterxml.jackson, so other generators keep their current imports.SpringCodegen:versionOption(),readVersion()andpackageDir()helpers replace repeated option and path code. No behaviour change intended.spring-boot4cases inSpringGeneratorCodegenTest, covering Jackson 3 output, the springdoc mapping and version overrides.SpringGeneratorTestclears theSystemproperties it sets, which fixes order-dependent failures.Notes for reviewers
AbstractJavaCodegenaffect every Java and Spring generator.Type of Change
Checklist
How to Test
Screenshots / Additional Context