swagger-core
swagger-core copied to clipboard
XML: No way to have an object with both attribute and element value
XML: No way to have an object with both attribute and element value
e.g.
This is a revival of this issue from OpenAPI years ago: https://github.com/OAI/OpenAPI-Specification/issues/630
I can define a object that has attributes, and some that have element values but not both. Simple solution would be:
AttributeObject:
type: object
properties:
name:
type: string
example: 'eventName'
xml:
attribute: true
data:
type: string
example: 'myvalue'
xml:
elementValue: true
xml:
name: 'attribute'
Something like this should produce:
If I have a REST API with a request body that has XML content instead of JSON, can Swagger automatically generate Swagger documentation for such an API? By this, I mean, just like for JSON REST APIs, this occurs in Spring Boot Java. Does the same also happen with XML?