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

swagger-client

Package Overview
Dependencies
Maintainers
2
Versions
295
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-client - npm Package Compare versions

Comparing version 2.1.16 to 2.1.17

38

lib/resolver.js

@@ -17,2 +17,4 @@ 'use strict';

this.failedUrls = [];
this.resolverCache = {};
this.pendingUrls = {};
};

@@ -314,5 +316,6 @@

// resolve anything that is local
var lock = {};
for(var ii = 0; ii < toResolve.length; ii++) {
(function(item, spec, self) {
// NOTE: this used to be item.root === null, but I (@ponelat) have added a guard against .split, which means item.root can be ''
(function(item, spec, self, lock, ii) {
if(!item.root || item.root === root) {

@@ -340,2 +343,5 @@ // local resolve

self.failedUrls.push(obj.url);
if (lock) {
delete lock[item.root];
}
unresolvedRefs[item.key] = {

@@ -352,2 +358,8 @@ root: item.root,

var swagger = response.obj;
if (lock) {
delete lock[item.root];
}
if (self.resolverCache) {
self.resolverCache[item.root] = swagger;
}
self.resolveItem(swagger, item.root, resolutionTable, resolvedRefs, unresolvedRefs, item);

@@ -367,4 +379,21 @@ processedCalls += 1;

new SwaggerHttp().execute(obj, opts);
(function waitForUnlock() {
setTimeout(function() {
if (lock[obj.url]) {
waitForUnlock();
}
else {
var cached = self.resolverCache[obj.url];
if (_.isObject(cached)) {
obj.on.response({obj: cached}), 1;
}
else {
lock[obj.url] = true;
new SwaggerHttp().execute(obj, opts);
}
}
}, 0);
})();
}
else {

@@ -380,3 +409,3 @@ processedCalls += 1;

}
}(toResolve[ii], spec, this));
}(toResolve[ii], spec, this, lock, ii));
}

@@ -477,2 +506,3 @@

this.resolveAllOf(spec.definitions);
this.resolverCache = null;
callback.call(this.scope, spec, unresolvedRefs);

@@ -479,0 +509,0 @@ }

2

package.json

@@ -11,3 +11,3 @@ {

"description": "swagger-client is a javascript client for use with swaggering APIs.",
"version": "2.1.16",
"version": "2.1.17",
"homepage": "http://swagger.io",

@@ -14,0 +14,0 @@ "repository": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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