[JAVA] [SPRING] [PKMST] [MICRONAUT] XML wireformat: Fix Jackson useWrapping=false, JAXB+Jackson namespaces#18870
Conversation
61b59ba to
5728693
Compare
8e293d4 to
f444467
Compare
|
Hey @chschu! Sorry for this being held up for so long... i've now finally got around to open this PR. Following our discussions, could you briefly review this and see if you have anything to add? Would be looking forward to your feedback, and otherwise these fixes finally hitting the 7.7 release :) |
f444467 to
d5bcb30
Compare
3ef690c to
2fca7c7
Compare
|
@wing328 if you have some time at the weekend i'd highly appreciate this PR going into v7.7 if possible. I haven't heard back from @chschu which is co-author of this fix (which actually kickstarted my contributions here as it pointed me into the right direction), but from our discussion over at #18392 they seemed already pretty satisfied at the time. |
2fca7c7 to
16a725b
Compare
* generate JAXB annotations for attributes and elements * generate wrapper annotations (JAXB and Jackson) * use XML config from items for annotations of containers
…tter if enabled This is in line with the way the class annotations in `xmlAnnotations.mustache` are rendered – which only renders the `@Jackson`… xml annotations if additionalProperty jackson is true. Also reorder annotation attributes in the following order: - localName/name - namespace (optional) - isAttribute/useWrapping (optional)
This was slightly inspired by @jzrebiec via PR OpenAPITools#5371. Wrapping is the default since Jackson 2.1 – so explicitly rendering this will: - make generated model work out-of-the-box in Jackson 2.0 for instance - ensure the models still work if the local `XmlWrapper` was configured with `useXmlWrapper(false)`
This makes discovery & cross-navigation in IDE easier.
…e) for non-wrapped elements
Brings the SpringCodegen in line with other Java Codegen's
May look a bit more complex, but cuts out a lot of repetitiveness. Also reorders annotation attributes in the following order: - localName/name - namespace (optional) - isAttribute/useWrapping (optional)
Was not referenced anywhere in java-helidon resources folder
16a725b to
26be7d5
Compare
|
thanks for the PR, which has been merged. |
|
Hi @Philzen, it seems this PR broke the java-camel samples. results in several failed tests. Coud you have a look at this? |
Closes #2417
Closes #3223
Closes #5078
Closes #18869
Replaces #18392
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(upcoming 7.6.0 minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)