-
Notifications
You must be signed in to change notification settings - Fork 523
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
Swagger 2 validation allows path params to be non-required #1249
Comments
It may relate to #1111 |
It appears that the parser does not perform validation against the JSON schema. Is this intentional? |
Hi @gexclaude , Regards, |
Thank you a lot for your efforts! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As the spec states, path params are always required:
https://swagger.io/docs/specification/2-0/describing-parameters/
We encountered, that this validation is not performed in swagger-parser version 1.0.47.
A small example defining a path with two path params - one is required=true and one is required=false. This appears valid when reading with
new SwaggerParser().readWithInfo(content);
However editor complains, which is correct in my opinion:
The text was updated successfully, but these errors were encountered: