jeremyfiel
5 years agoVisitor
API Design: XML response returns a nested array
I'm having difficulty writing a definition for an XML response object which includes two strings and an array of integers in the same parent element.
```yml
Element:
type: array
description: returns a list of report ID's
required:
- result
- title
- dogs
properties:
result:
description: Server Response
type: string
name:
description: blah
type: string
items:
$ref: '#/components/schemas/name'
title:
description: Report ID
type: array
items:
$ref: '#/components/schemas/title'
xml:
wrapped: true
```
```xml
<element>
<name>jeremy</name>
<title>designer</title>
<dogs>tito</dogs>
<dogs>burrito</dogs>
<dogs>cheeto</dogs>
</element>
```