express-openapi-validator
Advanced tools
Comparing version 4.13.3 to 4.13.4
@@ -264,3 +264,3 @@ "use strict"; | ||
if (!options.apiSpec) | ||
throw (0, ono_1.default)('apiSpec required'); | ||
throw (0, ono_1.default)('apiSpec required.'); | ||
const securityHandlers = options.securityHandlers; | ||
@@ -267,0 +267,0 @@ if (securityHandlers != null) { |
@@ -26,11 +26,7 @@ "use strict"; | ||
tmpModules[modulePath] = require(modulePath); | ||
if (!tmpModules[modulePath][oId]) { | ||
// if oId is not found only module, try the module's default export | ||
tmpModules[modulePath] = tmpModules[modulePath].default; | ||
} | ||
} | ||
if (!tmpModules[modulePath][oId]) { | ||
throw Error(`Could not find 'x-eov-operation-handler' with id ${oId} in module '${modulePath}'. Make sure operation '${oId}' defined in your API spec exists as a handler function in '${modulePath}'.`); | ||
const handler = tmpModules[modulePath][oId] || tmpModules[modulePath].default; | ||
if (!handler) { | ||
throw Error(`Could not find 'x-eov-operation-handler' with id ${oId} in module '${modulePath}'. Make sure operation '${oId}' defined in your API spec exists as a handler function (or module has a default export) in '${modulePath}'.`); | ||
} | ||
const handler = tmpModules[modulePath][oId]; | ||
cache[cacheKey] = handler; | ||
@@ -37,0 +33,0 @@ return handler; |
{ | ||
"name": "express-openapi-validator", | ||
"version": "4.13.3", | ||
"version": "4.13.4", | ||
"description": "Automatically validate API requests and responses with OpenAPI 3 and Express.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
394492
5793