swagger-api / swagger-api/swagger-codegen-generators
Java-XML-Binding is only for javax and jakarta is ignored
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 299
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
Taking a look at https://github.com/swagger-api/swagger-codegen-generators/blob/master/src/main/resources/handlebars/Java/model.mustache Lines 24 to 26, shows up that on setted Config-property "withXml" the imports for xml-binding types will always be generated to the old javax-package "javax.xml.bind.annotation".
This should be updated depending on the setted "jakarta" Config-Property, so that then the import leads to "jakarta.xml.bind.annotation" instead of "javax.xml.bind.annotation"
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 in src/main/resources/handlebars/Java/model.mustache, especially lines 24–26, and inspect how the withXml and jakarta configuration properties are exposed. Done means XML-binding imports use javax.xml.bind.annotation by default and jakarta.xml.bind.annotation when jakarta is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100