cancel
Showing results for 
Search instead for 
Did you mean: 

UI unable to render multiple examples using $ref

Occasional Visitor

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.

1 REPLY 1
Highlighted
Moderator

Re: UI unable to render multiple examples using $ref

As a snippet alone that would obviously not work. Can you share the full file you've been trying to use?


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Here?
Join us and watch the welcome video:
Watch the new Interview