swagger-api / swagger-api/swagger-codegen-generators
Cxf: use jackson annotation for generated interface
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Currently, the cxf generator does not support jackson annotation for interfaces leading to deserialization issues at runtime when dealing with oneOf modelisation.
Therefore, I propose you a PR to fix this problem.
Any feedback will be appreciated,
I also leave here some improvements if someone has time to enhance the cxf generator:
- The property in the @JsonTypeInfo is hardcoded, you can make it dynamic and equals to the discriminator if one is present
- The SubTypes name value is always equals to the classname, make it equals to the value of mapping if a mapping is defined
Thanks for taking the time
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CXF generator and the templates or entry points that produce interfaces; no specific file or test is named in the issue. Check how Jackson annotations are currently emitted for oneOf models, then verify that generated interfaces support the reported runtime deserialization case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100