swagger-api / swagger-api/swagger-codegen-generators

Java-XML-Binding is only for javax and jakarta is ignored

Open
#1,226 2 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.