jerry91
First I declared my response simply using media type application/json
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/MyResponse'
Then, for a better readability, I define the response schema as following:
schemas:
MyResponse:
type: object
properties:
outbox_manager:
$ref: '#/components/schemas/TheFirstArray'
TheFirstArray:
type: array
items:
type: object
properties:
field01:
type: string
field02:
type: string
other_details:
type: array
items:
$ref: '#/components/schemas/TheSecondArray'
TheSecondArray:
type: object
properties:
field01:
type: string
field02:
type: string
Et voila!! 😉