-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
example/default ignored when using ref #745
Comments
You can't set properties on the same level as a $ref. $ref replaces everything on the same level. So it works as expected by OpenAPI. See the section "$ref and Sibling Elements" here: https://swagger.io/docs/specification/using-ref/ |
Ok, thanks. I'm running this OpenAPI file through three OpenAPI linters and while I don't have the code any more, I'm fairly sure I wouldn't have reported this if they were complaining about my spec. That said, the OpenAPI 3 spec (what I'm using) appears to agree with you - https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#referenceObject |
you can use allOf feature though |
Closing this. Thanks @m-mohr for answering here 🙇 ! |
I have the following:
The
default
andexample
flags are both being ignored and I'm seeing "success: true" on the redoc example.I expected that the parent's properties would be the ones exemplified, similar to how "description" uses the highest level one.
The text was updated successfully, but these errors were encountered: