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
Request validator middleware throws for valid requests (query parsing) #369
Comments
@dystopiandev interesting. this almost seems as if some middleware in the stack is |
I'll send a PR shortly. |
* implement as standard express middleware * conver to standard express middleware * require options only * update codacy * update ncyrc * update nyc * update readme * update README * update README * cleanup specs * remove sync test * update examples * namspace errors and provide a default export * alpha.2 * fix test * publish changelog * improve response type handling * increment patch version * improve async init with connect middleware * update packages * update deps * fix operation handlers when installed as router middleware * update README * do not pass routes to path params * update patch version * add default resolver cache * update alpha version * update README * fix for issue #369 * add test no query params * increment alpha version * increment alpha to beta * update README * Update README.md * Update README.md * increment beta version * remove default export * update import * example lock * update README * ignore sav file * add publish target * add publish target Co-authored-by: dystopiandev <redhart@dualsight.org>
Describe the bug
I use swagger-routes-express to parse and mount OAS3 paths as express routes. I mount the routes after using:
...but I get errors on all routes, whether or not they require any params.
Actual behavior
Throws
Bad Request: request should have required property 'query'
Expected behavior
Shouldn't throw, because all is right by the spec.
I solved it temporarily by changing:
...to:
...in
node_modules/express-openapi-validator/dist/middlewares/openapi.request.validator.js
...so I reckon changing this line to
...should resolve this.
The text was updated successfully, but these errors were encountered: