You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug expressOpenapiValidator.middleware generates an error UnhandledPromiseRejectionWarning
To Reproduce
Here is an example that systematically reproduces the bug from version 4.3.1 to version 4.4.0 of ʻexpress-openapi-validator`.
The bug does not occur in version 4.3.0
Here is the result when we run this small example with ʻexpress-openapi-validator` in version 4.4.0
node test.js
(node:25275) UnhandledPromiseRejectionWarning: TypeError: Cannot create property 'parameters' on string 'Description'
at RequestSchemaPreprocessor.preprocessPathLevelParameters (/DISKS/sdb1/serge-1604/tmp/test/node_modules/express-openapi-validator/dist/middlewares/parsers/request.schema.preprocessor.js:47:22)
at paths.forEach (/DISKS/sdb1/serge-1604/tmp/test/node_modules/express-openapi-validator/dist/middlewares/parsers/request.schema.preprocessor.js:19:22)
at Array.forEach (<anonymous>)
at RequestSchemaPreprocessor.preProcess (/DISKS/sdb1/serge-1604/tmp/test/node_modules/express-openapi-validator/dist/middlewares/parsers/request.schema.preprocessor.js:12:15)
at spec.then (/DISKS/sdb1/serge-1604/tmp/test/node_modules/express-openapi-validator/dist/openapi.validator.js:86:16)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:832:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
(node:25275) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async functionwithout a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:25275) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
node version : v10.16.0
The text was updated successfully, but these errors were encountered:
Describe the bug
expressOpenapiValidator.middleware
generates an errorUnhandledPromiseRejectionWarning
To Reproduce
Here is an example that systematically reproduces the bug from version 4.3.1 to version 4.4.0 of ʻexpress-openapi-validator`.
The bug does not occur in version 4.3.0
Here is the result when we run this small example with ʻexpress-openapi-validator` in version 4.4.0
node version :
v10.16.0
The text was updated successfully, but these errors were encountered: