[jaxrs-spec] add useJackson3 option
ZO
17m ago+112+112+012345678901234567890123456789-4-4-0123456789
Fixes #25363
Adds a useJackson3 option to the jaxrs-spec generator. Jackson 2 stays the default.
useJackson3option + cliOption,jacksonPackageproperty,JsonDeserializeimport mapping (moved totools.jackson.databindin Jackson 3)spec/pom.mustache:{{jacksonPackage}}groupIds for the JAX-RS providers,jackson-datatype-jsr310only for Jackson 2 (built into databind in Jackson 3), Jackson 3 version 3.1.2 (aligned with the CXF generator)pojo.mustache:Shape.POJOinstead ofShape.OBJECTfor Jackson 3 when additional properties are used- Test
testUseJackson3inJavaJAXRSSpecServerCodegenTest - Docs regenerated. jaxrs-spec samples regenerated: no changes, since Jackson 2 output is identical.
openliberty/pom.mustache unchanged: it only depends on jackson-annotations, which keeps the com.fasterxml.jackson.core groupId in Jackson 3.
Notes / possible follow-ups:
USE_JACKSON_3and the Jackson package constants are now duplicated across several generators. Happy to consolidate them intoAbstractJavaCodegenin a follow-up PR.- 3.1.8 is the latest Jackson 3.1.x; I kept 3.1.2 for consistency with CXF, happy to bump.
Related: #25364 (resteasy client, separate PR).
cc @blaghed
PR checklist
- Read the contribution guidelines.
- Run the following to build the project and update samples:
(For Windows users, please run the script in WSL)./mvnw clean package || exit ./bin/generate-samples.sh ./bin/configs/*.yaml || exit ./bin/utils/export_docs_generators.sh || exit
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. - If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.
@bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608 @martin-mfg @KannaKim