OpenAPITools / OpenAPITools/openapi-generator
[REQ][Java][Spring] xml issue
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Hello
Could you please help me with a problem related to schema generation with the <withXml>true</withXml> parameter?
The problem is that the schema is generated with two annotations: @JacksonXmlProperty and @XmlElement. This causes a conflict and a "Class has two properties of the same name" error during the response stage.
How can I integrate it with Jaxb or XmlMapper?
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 schema generation when the true parameter is enabled, then inspect how @JacksonXmlProperty and @XmlElement are added to the generated model. Reproduce the response-stage "Class has two properties of the same name" error and determine the documented integration path for JAXB or XmlMapper; done means the conflicting annotations no longer cause the error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100