Why "all other properties in a "$ref" object are ignored"? #3087
Closed
geoff-maddock
started this conversation in
General
Replies: 3 comments
|
Check 4.7.24 Reference Object
When I use different open-api documents from internet to test my parser I often see this rule broken. If you want to extend your schema, you shold use |
0 replies
|
OAS 3.0 inherited this behavior from the old (and long since expired) JSON Reference proposal. See #3526 (comment) for an explanation of why (for now) only |
0 replies
|
Since this was initially answered in 2022 with no further discussions, I'm going to close it as answered. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I was curious about why this is the case - I'm building an API from the ground up using Open API 3.0, and in some of my schemas I'm using compositional references to build the schemas, for example:
However, when editting using https://editor-next.swagger.io/, I'm getting errors on the lines such as
prepared_byandapproved_by, statingAll other properties in a "$ref" object are ignored. In this case, it would seem to me that these fields would or could have different descriptions than the schema they are referring to, because they represent something else.Is there any other way of doing this, or does someone have an explanation as to why this is a feature of the spec?
All reactions