Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-openapi-validator

Package Overview
Dependencies
Maintainers
1
Versions
281
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-openapi-validator - npm Package Compare versions

Comparing version 4.12.14 to 4.12.15

6

dist/framework/index.js

@@ -60,5 +60,6 @@ "use strict";

// Get document, or throw exception on error
return $refParser.mode === 'dereference'
const doc = $refParser.mode === 'dereference'
? $RefParser.dereference(absolutePath)
: $RefParser.bundle(absolutePath);
return doc;
}

@@ -69,5 +70,6 @@ else {

}
return $refParser.mode === 'dereference'
const doc = $refParser.mode === 'dereference'
? $RefParser.dereference(filePath)
: $RefParser.bundle(filePath);
return doc;
}

@@ -74,0 +76,0 @@ sortApiDocTags(apiDoc) {

@@ -235,3 +235,4 @@ "use strict";

for (const option of options) {
ancestor._discriminator.validators[option] = this.ajv.compile(newSchema);
ancestor._discriminator.validators[option] =
this.ajv.compile(newSchema);
}

@@ -352,4 +353,11 @@ }

v.parameters = v.parameters || [];
const match = (pathParam, opParam) =>
// if name or ref exists and are equal
(opParam['name'] && opParam['name'] === pathParam['name']) ||
(opParam['$ref'] && opParam['$ref'] === pathParam['$ref']);
// Add Path level query param to list ONLY if there is not already an operation-level query param by the same name.
for (const param of parameters) {
v.parameters.push(param);
if (!v.parameters.some((vparam) => match(param, vparam))) {
v.parameters.push(param);
}
}

@@ -356,0 +364,0 @@ }

{
"name": "express-openapi-validator",
"version": "4.12.14",
"version": "4.12.15",
"description": "Automatically validate API requests and responses with OpenAPI 3 and Express.",

@@ -35,6 +35,6 @@ "main": "dist/index.js",

"dependencies": {
"@types/multer": "^1.4.5",
"@types/multer": "^1.4.6",
"ajv": "^6.12.6",
"content-type": "^1.0.4",
"json-schema-ref-parser": "^9.0.7",
"json-schema-ref-parser": "^9.0.9",
"lodash.clonedeep": "^4.5.0",

@@ -41,0 +41,0 @@ "lodash.get": "^4.4.2",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc