You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
It seems that we are unable to detect extra parameters in the query of a request.
For example:
GET /pets?foo=bar passes without error even if the parameter "foo" is not defined in my OAS 3 spec.
Is it normal behavior? Is there any option to set in the library or ajv in order to get a sort of "additionalProperties : false" for the query parameters?
Thanks
The text was updated successfully, but these errors were encountered:
As I checked the if statement is responsible for this behavior. I did a quick test and when you comment out the condition the optional parameter will also be validated. Of course I assume this condition is there for a reason and solution for the problem will be more sophisticated.
In my opinion the optional parameters should also be validated, as we don't want to accept anything sent with GET request. At least the other framework for validation express-openapi-validator I used before verified that.
Hello,
It seems that we are unable to detect extra parameters in the query of a request.
For example:
GET /pets?foo=bar passes without error even if the parameter "foo" is not defined in my OAS 3 spec.
Is it normal behavior? Is there any option to set in the library or ajv in order to get a sort of "additionalProperties : false" for the query parameters?
Thanks
The text was updated successfully, but these errors were encountered: