express-openapi-validator
Advanced tools
Comparing version 4.13.4 to 4.13.5
@@ -41,3 +41,17 @@ "use strict"; | ||
} | ||
obj[propName] = sch.deserialize(data); | ||
try { | ||
obj[propName] = sch.deserialize(data); | ||
} | ||
catch (e) { | ||
validate.errors = [ | ||
{ | ||
keyword: 'serdes', | ||
schemaPath: data, | ||
dataPath: path, | ||
message: `format is invalid`, | ||
params: { 'x-eov-serdes': propName }, | ||
}, | ||
]; | ||
return false; | ||
} | ||
} | ||
@@ -87,3 +101,17 @@ return true; | ||
if (!!sch.serialize) { | ||
obj[propName] = sch.serialize(data); | ||
try { | ||
obj[propName] = sch.serialize(data); | ||
} | ||
catch (e) { | ||
validate.errors = [ | ||
{ | ||
keyword: 'serdes', | ||
schemaPath: data, | ||
dataPath: path, | ||
message: `format is invalid`, | ||
params: { 'x-eov-serdes': propName }, | ||
}, | ||
]; | ||
return false; | ||
} | ||
} | ||
@@ -90,0 +118,0 @@ return true; |
{ | ||
"name": "express-openapi-validator", | ||
"version": "4.13.4", | ||
"version": "4.13.5", | ||
"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 too big to display
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
396857
5821
1342