-
Notifications
You must be signed in to change notification settings - Fork 88
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
Issues with $ref
format checking
#13
Labels
Comments
🎉 This issue has been resolved in version 0.2.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've found a few problems with the way the validator tool checks
$ref
usage using version0.2.1
.I've created and attached a set of example files in example.zip which demonstrates the problems, unzip and run for
vi.yaml
.vi.yaml
errors are given only forheaders
,parameters
andresponses
despite the blacklist includingrequestBodies
which I reference in the same way.$ref
usages within the components object itself, which doesn't make sense because it encourages a spec writer to create a circular reference.$ref
format in OpenAPI v3 are invalid anyway. I sought clarification on this in Clarify statement aboutReference obects
inResponses object
OAI/OpenAPI-Specification#1679 - though the spec has not been updated yet (as of v3.0.2).Based on point 3 I think removing the
$ref
format checks entirely for OpenAPI v3 could be a good solution.Another option would be to workaround by adding an option to disable the walker's
$ref
checks, similarly to how many of the other checks can be flagged on and off.I'd be happy to try and do a PR for either of those options if it suits, just let me know.
Even if I did that though I think further may be needed to address point 1 to get complete spec checking - I haven't looked into why the validator doesn't behave the same way for all the
$ref
s and whether it is missing validating part of the tree.The text was updated successfully, but these errors were encountered: