You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining a reference inside of examples fields on various spec objects, instead of the Example Object, the reference should not be dereferenced.
For this specification:
responses:
ExampleResponse:
description: An error occurredcontent:
application/json:
schema:
$ref: '#/components/schemas/ExampleModel'examples:
$ref: '#/components/examples/tshirt'examples:
tshirt:
summary: Sample T-shirt datavalue:
# Example value starts hereid: 17name: T-shirtdescription: 100% cotton shirtcategories: [clothes]
when the example gets dereferenced, each field of tshirt will be seen as a separate example. Each of them will be rendered as an option for examples select:
This does not happen for OpenAPI 3.1:
Additional context or thoughts
To fix this, we need to utilise ApiDOM for OpenAPI 3.0.
When defining a reference inside of
examples
fields on various spec objects, instead of theExample Object
, the reference should not be dereferenced.For this specification:
when the example gets dereferenced, each field of
tshirt
will be seen as a separate example. Each of them will be rendered as an option for examples select:This does not happen for OpenAPI 3.1:
Additional context or thoughts
To fix this, we need to utilise ApiDOM for OpenAPI 3.0.
Originally reported by @glowcloud
The text was updated successfully, but these errors were encountered: