OpenAPI-Specification
OpenAPI-Specification copied to clipboard
support references for examples
Like other items that support the $ref syntax, would like to have $ref support for example values.
@fehguy There is a problem with it.
example is user supplied data so it can natively have $ref.
For example, API that returns JSON Schemas, or any other JSON data since JSON Reference is widely used.
And I have a real-life example, Google Discovery is API that returned data format based on top of JSON Schema.
So I guess this can only work easily if we wrap the actual examples in some other format. Is this sensible?
#636 did some changes related to this, but I'm not sure if this finished this issue.
@fehguy - see https://github.com/OAI/OpenAPI-Specification/issues/666#issuecomment-213364604.
PR #636 added Example Objects, and they can be referenced in 3.0. #666 definitively decided that referencing example values (which can look identical to references in some cases) will not be done.
Closing this as resolved with referenceable Example Objects in 3.0.