-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$ref handling incorrect when alongside other json schema attributes for OpenAPI 3.1 Spec #90
Comments
Interesting. There are two ways to handle this: add support by crafting a new Choice A: Support the shorthand for 3.1+ docs What would folks like to see? |
I vote choice A as we have seen OpenAPI docs use this in the wild and it is valid according to specification and it would be great to have libopenapi match the specification where possible |
I think choice A is the best one. Let's do that, adding it to the backlog. |
@daveshanley just wanted to ask if you had thought anymore about if you might support this? We are coming across more and more specifications using OpenAPI this way especially with examples, descriptions etc etc:
would love to see this prioritised and figure out how libopenapi can support this |
I've seen a few more requests come in for this. Will support it yes - it's just a case of time to add the feature. |
Here is an example of a schema that I believe isn't handled correctly:
For OpenAPI 3.0 this is being handle such that it is just treated as a reference which I believe is correct.
But for 3.1 which is using
JSON Schema Specification Draft 2020-12
thiswhich is a quote from a comment in this stack overflow question https://stackoverflow.com/questions/56749522/using-a-ref-and-other-properties-within-a-json-schema and while it is not explicitly called out here https://json-schema.org/understanding-json-schema/structuring.html#ref it does list the 3.0 behaviour versus 3.1
So my thoughts are that this should potentially return a allOf array with the two schemas split out. Thoughts?
The text was updated successfully, but these errors were encountered: