Exclude unwanted "xml" tags from schema.
Hi everyone.
My team is working on introducing new REST API version. Our current version supports XML as well but going forward we would like to drop the support for it. We use Java for development and have encountered a situation that we can't seem to find solution for.
We rename our POJO/Bean classes by using @XmlRootElement.
@XmlRootElement(name = "simpleDomain")
When OAPI spec is generated the schema for this class will look something like
"simpleDomain" : { "type" : "object", "properties" : { "id" : { "type" : "string" }, "name" : { "type" : "string" } }, "xml" : { "name" : "simpleDomain" } },
We would like to omit the xml part
"xml" : { "name" : "simpleDomain" }
The only solution we have found that does that is to remove @XmlRootElement but if we do that then we break backwards compatibility. Have gone through docs on github and found https://github.com/OAI/OpenAPI-Specification/blob/3.0.1/versions/3.0.1.md#xmlObject but this doesn't allow hiding of the say element.
We are running 2.2.7 of swagger-jaxrs2 of swager.core.v3
If there is any information missing, please let me know and I will add.