feat(java): support useJackson3 for rest-assured library
Merged
AU
24d ago+23481+23481+01234567890123456789012345678901234567890123456789-8-8-0123456789
Honors useJackson3=true for generatorName=java with library=rest-assured, which previously threw.
JacksonObjectMapperextendsJackson3Mapperwith aJackson3ObjectMapperFactory, built throughJsonMapper.builder(); usesJsonNullableJackson3ModulewhenopenApiNullableis on.RFC3339InstantDeserializerandRFC3339JavaTimeModuleare not generated (jsr310 is in Jackson 3 databind). Joda is not supported on this path.pom.xml,build.gradleandbuild.sbtswitch to thetools.jacksonBOM, rest-assured 6.0.1 and Java 17. Annotations stay oncom.fasterxml.jackson.annotation.- Jackson 2 output is unchanged; regenerating
rest-assuredandrest-assured-jacksonproduces no diff.
Tests: new JavaClientCodegenTest#testRestAssuredWithJackson3; the new rest-assured-jackson3 sample compiles with mvn compile.
Closes #25076
PR checklist
- Read the contribution guidelines.
- Built the project, regenerated samples and docs (
bin/generate-samples.sh,export_docs_generators.sh) and committed all changed files.
Summary by cubic
Honors useJackson3=true for generatorName=java with library=rest-assured, which previously threw.
JacksonObjectMapperextendsJackson3Mapperand uses aJackson3ObjectMapperFactorybuilt throughJsonMapper.builder(), withJsonNullableJackson3ModulewhenopenApiNullableis on.- The pom, gradle, and sbt templates switch to the
tools.jacksonBOM, rest-assured 6.0.1, and require Java 17+; Joda time is not supported on this path. - Jackson 2 output is unchanged; regenerating existing
rest-assuredsamples produces no diff, and the newrest-assured-jackson3sample compiles withmvn compile.
Closes #25076.