-
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
NoMethodError thrown when $ref path cant be resolved #29
Comments
Ok, I will try to validate the OpenAPI definition itself |
@ota42y I had this problem again. I think if we are validating, and there is a Something like: openapi_parser/lib/openapi_parser/schema_validator.rb Lines 97 to 101 in 91a455a
I don't think that's the most elegant solution, but effectively something like it. |
Thanks to feedback!! I think we can find this error when we load the schema, so instead of raising an exception at runtime, raising an exception on loading phease like this line.
|
@ota42y I have changed my PR from a draft PR. Please confirm if it's acceptable for you 👍 |
Add `strict_reference_validation` config and implementation to address/implement #29
We have released a version with a fix for this issue! ( Thanks @makdad !!!) |
When referencing a ref path that cannot be resolved the following error is thrown:
#<NoMethodError: undefined method `any_of' for #OpenAPIParser::Schemas::Reference:0x000055bceb4393f8>
This error should be translated to something that better indicates the root cause.
This is a pretty minor problem since the schema should be validated against OpenApi specs to begin with.
Sample YAML file:
The text was updated successfully, but these errors were encountered: