Skip to content

Authority/specification governing $ref in Schema Object #3301

Closed Answered by hkosova
watuwo asked this question in Q&A
Discussion options

You must be logged in to vote

Which specification is responsible for describing the processing of $ref in Schema Objects?

  • OpenAPI 3.1 (ultimate authority)
  • JSON Schema 2020-12 (any authority?)

(This answer is specifically about OAS 3.1. Earlier versions are slightly different in this regard.)

There are two types of $refs:

  1. Within schemas (aka Schema Objects), the $refs are processed according to the JSON Schema rules. For example, given a schema definition based JSON Schema 2020-12 (the default version used by OAS 3.1), this is the relevant section of the JSON Schema spec.

  2. Everywhere else (e.g. $refs to parameter/response/requestBody definitions) the $refs are the so-called "Reference Objects" and are processed …

Replies: 3 comments 12 replies

Comment options

You must be logged in to vote
5 replies
@watuwo
Comment options

@jdesrosiers
Comment options

@watuwo
Comment options

@jdesrosiers
Comment options

@watuwo
Comment options

Comment options

You must be logged in to vote
7 replies
@watuwo
Comment options

@handrews
Comment options

@watuwo
Comment options

@handrews
Comment options

@jdesrosiers
Comment options

Answer selected by handrews
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants