I\'m making a document on swagger editor, but I don\'t know how solve that..
What do I need to write in a YAML file to get this result?
&
I believe you'd do it like this:
definitions:
Tag:
xml:
# use `tag` instead of `Tag` as the name
name: tag
properties:
example:
type: array
items:
$ref: '#/definitions/Example'
xml:
# don't wrap array
wrapped: false
Example:
type: object
properties:
Amount:
type: number
format: float
xml:
# it's an attribute, not an element
attribute: true
NumberOfGuests:
type: integer
format: int32
xml:
attribute: true
Note the xml
attributes to tell how to format the XML specific payload in JSON Schema. More on that structure is found here.