I have a nested array as a parameter in the body of my POST method:
parameters:
- in: body
name: matrix
description: blabla
schema:
type: array
items:
schema:
type: array
items:
schema:
type: double
I would like to add an example for this array to be visible in Swagger UI. I tried the following, however it doesn't seem to work - nothing is displayed as example in the body field. If I enter [[1.0, 2.0],[3.0, 4.0]] manually in the body field in Swagger UI, it works just fine.
parameters:
- in: body
name: matrix
description: blabla
schema:
type: array
items:
schema:
type: array
items:
schema:
type: double
example: [[1.0, 2.0],[3.0, 4.0]]
Update: After implementing Helen's suggestions, here is how it looks:
