If I'm right, currently there is no way to do this:
/pets:
get:
description: Returns all pets from the system that the user has access to
responses:
'200':
description: A list of pets.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/pet'
Adding an item attribute to Swagger::Objects::Schema is enough. The struct must also become a class because item is itself of type Schema, and recursive structs are not allowed. I tested and it works.
Hi,
If I'm right, currently there is no way to do this:
Adding an
item
attribute toSwagger::Objects::Schema
is enough. The struct must also become a class becauseitem
is itself of typeSchema
, and recursive structs are not allowed. I tested and it works.If that's ok with you I could propose a PR.