Hilzu / express-openapi-validate

Express middleware to validate requests based on an OpenAPI 3 document
Apache License 2.0
75 stars 12 forks source link

ValidationError: Error while validating request: request should have required property '.headers' #82

Closed vshresthaeeposit closed 7 months ago

vshresthaeeposit commented 7 months ago

My current project is in node v14. When I tried upgrading it to v16, I am getting following error from the api.

ValidationError: Error while validating request: request should have required property '.headers' at validate ($home/app/node_modules/express-openapi-validate/dist/OpenApiValidator.js:105:29) at Layer.handle [as handle_request] ($home/app/node_modules/express/lib/router/layer.js:95:5) at next ($home/app/node_modules/express/lib/router/route.js:137:13) at Route.dispatch ($home/app/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] ($home/app/node_modules/express/lib/router/layer.js:95:5) at $home/app/node_modules/express/lib/router/index.js:281:22 at param ($home/app/node_modules/express/lib/router/index.js:354:14) at param ($home/app/node_modules/express/lib/router/index.js:365:14) at param ($home/app/node_modules/express/lib/router/index.js:365:14) at Function.process_params ($home/app/node_modules/express/lib/router/index.js:410:3)