-
-
Notifications
You must be signed in to change notification settings - Fork 220
Rejecting unknown query parameters should be optional #133
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
Comments
@rgcunha yes. this is a good idea. we'll plan to provide this option to the request validator |
Rejecting unknown query parameters should be optional #133
hi @rgcunha, give validateRequests: {
allowUnknownQueryParameters: true
} to allow unknown query params to pass validation |
tested. works as expected. thanks @cdimascio 👌 |
Any way of doing this for a specific endpoint instead of globally? |
@WilliamStewart Currently, there is not. It's something to consider. Feel free to open an issue and perhaps a description of the use case. |
Rejecting unknown query parameters should be optional #133
Hi,
Would it be possible to make unknown query parameter validation optional?
https://github.com/cdimascio/express-openapi-validator/blob/master/src/middlewares/openapi.request.validator.ts#L109
Problem:
We have an API for a react-native app that needs to support multiple client versions. Some of the legacy versions still send query params which are no longer specified in the latest API spec as such we need to bypass the unknown query param validation.
Unfortunately there doesn't seem to be a way to make this validation optional atm.
Thanks
The text was updated successfully, but these errors were encountered: