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

swagger-client

Package Overview
Dependencies
Maintainers
1
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 1.0.1 to 1.0.2

35

lib/swagger.js

@@ -327,3 +327,3 @@ // Generated by CoffeeScript 1.4.0

SwaggerModel.prototype.getMockSignature = function(prefix, modelsToIgnore) {
SwaggerModel.prototype.getMockSignature = function(modelsToIgnore) {
var classClose, classOpen, prop, propertiesStr, returnVal, strong, strongClose, stronger, _i, _j, _len, _len1, _ref, _ref1;

@@ -336,11 +336,8 @@ propertiesStr = [];

}
strong = '<span style="font-weight: bold; color: #000; font-size: 1.0em">';
stronger = '<span style="font-weight: bold; color: #000; font-size: 1.1em">';
strong = '<span class="strong">';
stronger = '<span class="stronger">';
strongClose = '</span>';
classOpen = strong + 'class ' + this.name + '(' + strongClose;
classClose = strong + ')' + strongClose;
returnVal = classOpen + '<span>' + propertiesStr.join('</span>, <span>') + '</span>' + classClose;
if (prefix != null) {
returnVal = stronger + prefix + strongClose + '<br/>' + returnVal;
}
classOpen = strong + this.name + ' {' + strongClose;
classClose = strong + '}' + strongClose;
returnVal = classOpen + '<div>' + propertiesStr.join(',</div><div>') + '</div>' + classClose;
if (!modelsToIgnore) {

@@ -354,3 +351,3 @@ modelsToIgnore = [];

if ((prop.refModel != null) && (modelsToIgnore.indexOf(prop.refModel)) === -1) {
returnVal = returnVal + ('<br>' + prop.refModel.getMockSignature(void 0, modelsToIgnore));
returnVal = returnVal + ('<br>' + prop.refModel.getMockSignature(modelsToIgnore));
}

@@ -383,2 +380,3 @@ }

this.descr = obj.description;
this.required = obj.required;
if (obj.items != null) {

@@ -421,9 +419,14 @@ if (obj.items.type != null) {

SwaggerModelProperty.prototype.toString = function() {
var str;
str = this.name + ': ' + this.dataTypeWithRef;
var req, str;
req = this.required ? 'propReq' : 'propOpt';
str = '<span class="propName ' + req + '">' + this.name + '</span> (<span class="propType">' + this.dataTypeWithRef + '</span>';
if (!this.required) {
str += ', <span class="propOptKey">optional</span>';
}
str += ')';
if (this.values != null) {
str += " = ['" + this.values.join("' or '") + "']";
str += " = <span class='propVals'>['" + this.values.join("' or '") + "']</span>";
}
if (this.descr != null) {
str += ' {' + this.descr + '}';
str += ': <span class="propDesc">' + this.descr + '</span>';
}

@@ -533,5 +536,5 @@ return str;

if (listType != null) {
return models[listType].getMockSignature(dataType);
return models[listType].getMockSignature();
} else {
return models[dataType].getMockSignature(dataType);
return models[dataType].getMockSignature();
}

@@ -538,0 +541,0 @@ }

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

"description": "swagger.js is a javascript client for use with swaggering APIs.",
"version": "1.0.1",
"version": "1.0.2",
"homepage": "http://swagger.wordnik.com",

@@ -29,5 +29,5 @@ "repository": {

"devDependencies": {
"coffee-script": "~1.4.0"
"coffee-script": "~1.5.0"
},
"license": "apache 2.0"
}

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