swagger-api / swagger-api/swagger-core
JAXRS usage of @XmlElements and polymorphism support
Open
Nobody has claimed this yet.
backlog
- Dominant language
- Java
- Stars
- 7.5k
- Forks
- 2.3k
- Avg merge
- 18h 1m
- Merged PRs (30d)
- 10
Description
Swagger core currently doesn't support XmlElements annotation.
Is it a way to support it staying compliant with openapi specifications ?
Eg
@XmlElements( { @XmlElement(name=my_class1_xml_name, type=MyClass1DTO.class),
@XmlElement(name=my_class2_xml_name, type=MyClass2DTO.class),
} )
private List< AbstractMyClassDTO > myClassList;
Related json looks like:
"myClassList": [
{
"my_class1_xml_name": {
(...) myclass1 attributes ans elements (..)
},
"my_class1_xml_name": {
(...) myclass1 attributes ans elements (..)
},
"my_class1_xml_name": {
(...) myclass1 attributes ans elements (..)
},
"my_class2_xml_name": {
(...) myclass2 attributes ans elements (..)
} ]
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
The issue names no source files, tests, or entry points. Start by locating swagger-core's handling of JAXB @XmlElements annotations and compare the requested polymorphic XML representation with the applicable OpenAPI specification; done means the supported behavior and compliance requirements are defined and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100