I have recently discovered the possibility to add examples to components, request bodies and responses - which btw. is a great feature. I got it working to a certain extend by defining examples in the "components/examples" section and reusing them in the request bodies and response in the paths section. I now wonder, if there also is a way to do a composition on examples using $refs. I tried the following:
name: Test Product One
- $ref: '#/components/examples/ProductResponse'
But using this in a response as follows:
Returns a (possibly empty) list of products.
will render the "Example Value" section in the swagger UI as such:
Can you, please, let me know if I am missing something?