swagger-api / swagger-api/swagger-codegen
[JAXRS-SPEC] Jaxb annotations (WithXml option) with 'jaxrs-spec' ?
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I'm using 'jaxrs-spec' in order to generate server stubs that are deployed in a JEE server (JBoss Wildfy).
As I need my generated model pojos to be annotated with JAXB annotations (like @XmlRootElement), I have enabled the 'withXml" option. This is working very fine with "Java" language, but does not seem possible with "jaxrs-spec". Right ??
As a result, because of the missing JAXB annotations, jaxrs responses of my web services are producing incorrect xml (ie without namespace declaration) although xml namespace is defined in the yaml file.
Did someone already manage to generate jaxb annotations in combination with 'jaxr-spec' language ? Any workaround ?
Thx in advance,
Bernard.
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 by comparing Java and jaxrs-spec generation with the withXml option, using the YAML namespace configuration described in the report. Confirm whether the generated model POJOs receive JAXB annotations and whether the resulting JAX-RS XML responses include the namespace declaration; the issue is done when both behaviors are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100