I am using swagger-ui version 2.2.8
Our existing API can produce application/json as well as application/xml.
For a single record result in json it produces:
{
"person": {
"id": 23,
"name": "John"
}
}
and for XML it produces:
<person>
<id>23</id>
<name>John</name>
</person>
My swagger-schema for this is:
{
"person": {
"type": "object",
"properties": {
"person": {
"$ref": "#/definitions/personfields"
}
}
}
}
When viewed in swagger-ui the json model is looking fine. However the XML-model becomes:
<person>
<person>
<id>1</id>
<name>string</name>
</person>
</person>
Is there a way to prevent this double <person> but still get the correct JSON result?