Hilzu/express-openapi-validate

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

Closed this issue · 0 comments

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)