A reference to something should always be a JSON pointer and not a name (security scheme example) #26
Replies: 4 comments 2 replies
-
Discriminator too? |
Beta Was this translation helpful? Give feedback.
-
Note that there is a large conversation about referencing happening over at AsyncAPI, and while there are things involved there specific to AsyncAPI, it is very much relevant to OpenAPI (and JSON Schema) as well. |
Beta Was this translation helpful? Give feedback.
-
Note that AsyncAPI is now fixing this for security schemes. |
Beta Was this translation helpful? Give feedback.
-
We're now considering going in the other direction - things should be component names and not JSON Pointers (although within JSON Schema that will only change if JSON Schema does): |
Beta Was this translation helpful? Give feedback.
-
In v3, some "reusable" elements are referenced by name instead of using a JSON pointer reference: security schemes (and their scopes), or tags for instance.
in v4, A JSON pointer reference should be the only way of referencing something:
Here's how it would work for security schemes (did not yet looked how it would work for scopes):
v3
V4 proposal
PS: Speaking of security, we could also have reusable securityRequirements (but that's another discussion)
Beta Was this translation helpful? Give feedback.
All reactions