Forum Discussion

prashant1's avatar
prashant1
Occasional Visitor
5 years ago

UI unable to render multiple examples using $ref

I am using OpenAPI3(https://swagger.io/docs/specification/adding-examples/) and trying to refer to multiple in the schema as follows:

content:
  application/json:
    schema:
      $ref: '#/components/schemas/MyObject'
    examples:
      objectExample:
        $ref: '#/components/examples/objectExample'
      otherObjectExample:
        $ref: '#/components/examples/otherObjectExample'

There is no error for the references so I guess the reference is valid, UI is not able to render the example JSON. Any help would be much appreciated.