Skip to content
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

Not validating if there is required header or query param #185

Open
ganeshbala2008 opened this issue Jul 18, 2022 · 2 comments
Open

Not validating if there is required header or query param #185

ganeshbala2008 opened this issue Jul 18, 2022 · 2 comments

Comments

@ganeshbala2008
Copy link

ganeshbala2008 commented Jul 18, 2022

Versions:
openapi-validator-middleware: 3.2.6
fastify: 3.28.0
node: 16.14.0
openapi: 3.0.1
Router: Fastify

I am validating the request payload and header using the middleware. The validation is not happening when we have the required parameter as true for the header and query param.

For example,
Header:
site: test
required: true
queryparam:
filter: {}
required: false

In the above scenario, the validation happens if both are not present, Say if we have querparams the validation get bypassed

@thegu5
Copy link

thegu5 commented Apr 17, 2023

Can confirm, same issue here

@ganeshbala2008
Copy link
Author

ganeshbala2008 commented Apr 17, 2023

@thegu5 Issue still persists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants