\n";
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.info : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
- buffer += "
\n\n
\n\n
\n\n \n
\n
\n\n
\n\n
\n\n \n";
},"7":function(depth0,helpers,partials,data) {
- return "
\n";
- },"9":function(depth0,helpers,partials,data) {
return "
\n
";
- },"11":function(depth0,helpers,partials,data) {
+ },"9":function(depth0,helpers,partials,data) {
var stack1, buffer = " \n";
- stack1 = helpers.each.call(depth0, depth0, {"name":"each","hash":{},"fn":this.program(12, data),"inverse":this.noop,"data":data});
+ stack1 = helpers.each.call(depth0, depth0, {"name":"each","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
return buffer + "
\n";
-},"12":function(depth0,helpers,partials,data) {
+},"10":function(depth0,helpers,partials,data) {
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = " "
+ escapeExpression(lambda((depth0 != null ? depth0.scope : depth0), depth0))
+ "
\n";
-},"14":function(depth0,helpers,partials,data) {
+},"12":function(depth0,helpers,partials,data) {
return "";
- },"16":function(depth0,helpers,partials,data) {
+ },"14":function(depth0,helpers,partials,data) {
return "
\n \n
\n";
- },"18":function(depth0,helpers,partials,data) {
+ },"16":function(depth0,helpers,partials,data) {
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "
\n
Response Class (Status "
+ escapeExpression(((helper = (helper = helpers.successCode || (depth0 != null ? depth0.successCode : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"successCode","hash":{},"data":data}) : helper)))
+ ")
\n ";
- stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.successDescription : depth0), {"name":"if","hash":{},"fn":this.program(19, data),"inverse":this.noop,"data":data});
+ stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.successDescription : depth0), {"name":"if","hash":{},"fn":this.program(17, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
return buffer + "\n
\n
\n
\n
\n";
-},"19":function(depth0,helpers,partials,data) {
+},"17":function(depth0,helpers,partials,data) {
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, buffer = "
";
stack1 = ((helper = (helper = helpers.successDescription || (depth0 != null ? depth0.successDescription : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"successDescription","hash":{},"data":data}) : helper));
if (stack1 != null) { buffer += stack1; }
return buffer + "
";
-},"21":function(depth0,helpers,partials,data) {
+},"19":function(depth0,helpers,partials,data) {
var stack1, buffer = "
Headers
\n \n";
-},"22":function(depth0,helpers,partials,data) {
+},"20":function(depth0,helpers,partials,data) {
var lambda=this.lambda, escapeExpression=this.escapeExpression;
return "
\n | "
+ escapeExpression(lambda((data && data.key), depth0))
@@ -514,15 +478,15 @@ this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function
+ " | \n "
+ escapeExpression(lambda((depth0 != null ? depth0.other : depth0), depth0))
+ " | \n
\n";
-},"24":function(depth0,helpers,partials,data) {
+},"22":function(depth0,helpers,partials,data) {
return "
Parameters
\n
\n \n \n | Parameter | \n Value | \n Description | \n Parameter Type | \n Data Type | \n
\n \n \n\n \n
\n";
- },"26":function(depth0,helpers,partials,data) {
+ },"24":function(depth0,helpers,partials,data) {
return "
\n
Response Messages
\n
\n \n \n | HTTP Status Code | \n Reason | \n Response Model | \n Headers | \n
\n \n \n \n
\n";
- },"28":function(depth0,helpers,partials,data) {
+ },"26":function(depth0,helpers,partials,data) {
return "";
-},"30":function(depth0,helpers,partials,data) {
+},"28":function(depth0,helpers,partials,data) {
return "
\n";
- },"32":function(depth0,helpers,partials,data) {
+ },"30":function(depth0,helpers,partials,data) {
return "
Request Headers
\n \n";
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "
\n - \n \n";
- stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.parameters : depth0), {"name":"if","hash":{},"fn":this.program(24, data),"inverse":this.noop,"data":data});
+ stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.parameters : depth0), {"name":"if","hash":{},"fn":this.program(22, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
- stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.responseMessages : depth0), {"name":"if","hash":{},"fn":this.program(26, data),"inverse":this.noop,"data":data});
+ stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.responseMessages : depth0), {"name":"if","hash":{},"fn":this.program(24, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
- stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isReadOnly : depth0), {"name":"if","hash":{},"fn":this.program(28, data),"inverse":this.program(30, data),"data":data});
+ stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isReadOnly : depth0), {"name":"if","hash":{},"fn":this.program(26, data),"inverse":this.program(28, data),"data":data});
if (stack1 != null) { buffer += stack1; }
buffer += " \n
\n
Curl
\n
\n
Request URL
\n
\n";
- stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.showRequestHeaders : depth0), {"name":"if","hash":{},"fn":this.program(32, data),"inverse":this.noop,"data":data});
+ stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.showRequestHeaders : depth0), {"name":"if","hash":{},"fn":this.program(30, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
return buffer + "
Response Body
\n
\n
Response Code
\n
\n
Response Headers
\n \n
\n
\n \n \n";
},"useData":true});
@@ -1017,7 +979,7 @@ this["Handlebars"]["templates"]["status_code"] = Handlebars.template({"1":functi
},"useData":true});
/**
* swagger-client - swagger-client is a javascript client for use with swaggering APIs.
- * @version v2.1.13
+ * @version v2.1.11
* @link http://swagger.io
* @license Apache-2.0
*/
@@ -1214,7 +1176,7 @@ PasswordAuthorization.prototype.apply = function (obj) {
return true;
};
-},{"./helpers":4,"btoa":14,"cookiejar":17,"lodash-compat/collection/each":53,"lodash-compat/collection/includes":56,"lodash-compat/lang/isArray":141,"lodash-compat/lang/isObject":145}],3:[function(require,module,exports){
+},{"./helpers":4,"btoa":14,"cookiejar":19,"lodash-compat/collection/each":56,"lodash-compat/collection/includes":59,"lodash-compat/lang/isArray":144,"lodash-compat/lang/isObject":148}],3:[function(require,module,exports){
'use strict';
var _ = {
@@ -1437,7 +1399,7 @@ SwaggerClient.prototype.build = function (mock) {
if (this.spec) {
self.swaggerObject = this.spec;
setTimeout(function () {
- new Resolver().resolve(self.spec, self.url, self.buildFromSpec, self);
+ new Resolver().resolve(self.spec, self.buildFromSpec, self);
}, 10);
} else {
this.clientAuthorizations.apply(obj);
@@ -1641,12 +1603,6 @@ SwaggerClient.prototype.buildFromSpec = function (response) {
});
});
- _.forEach(response.definitions, function (definitionObj, definition) {
- definitionObj['id'] = definition.toLowerCase();
- definitionObj['name'] = definition;
- self.modelsArray.push(definitionObj);
- });
-
this.isBuilt = true;
if (this.usePromise) {
@@ -1788,7 +1744,7 @@ SwaggerClient.prototype.fail = function (message) {
}
};
-},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":8,"./types/model":9,"./types/operation":10,"./types/operationGroup":11,"lodash-compat/array/indexOf":50,"lodash-compat/collection/find":54,"lodash-compat/collection/forEach":55,"lodash-compat/function/bind":59,"lodash-compat/lang/cloneDeep":139,"lodash-compat/lang/isArray":141,"lodash-compat/lang/isFunction":143,"lodash-compat/lang/isObject":145,"lodash-compat/lang/isPlainObject":146,"lodash-compat/lang/isUndefined":149,"q":159}],4:[function(require,module,exports){
+},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":8,"./types/model":9,"./types/operation":10,"./types/operationGroup":11,"lodash-compat/array/indexOf":53,"lodash-compat/collection/find":57,"lodash-compat/collection/forEach":58,"lodash-compat/function/bind":62,"lodash-compat/lang/cloneDeep":142,"lodash-compat/lang/isArray":144,"lodash-compat/lang/isFunction":146,"lodash-compat/lang/isObject":148,"lodash-compat/lang/isPlainObject":149,"lodash-compat/lang/isUndefined":152,"q":161}],4:[function(require,module,exports){
(function (process){
'use strict';
@@ -1841,7 +1797,7 @@ var simpleRef = module.exports.simpleRef = function (name) {
}).call(this,require('_process'))
//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9oZWxwZXJzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG52YXIgXyA9IHtcbiAgaXNQbGFpbk9iamVjdDogcmVxdWlyZSgnbG9kYXNoLWNvbXBhdC9sYW5nL2lzUGxhaW5PYmplY3QnKSxcbiAgaW5kZXhPZjogcmVxdWlyZSgnbG9kYXNoLWNvbXBhdC9hcnJheS9pbmRleE9mJylcbn07XG5cbm1vZHVsZS5leHBvcnRzLl9fYmluZCA9IGZ1bmN0aW9uIChmbiwgbWUpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uKCl7XG4gICAgcmV0dXJuIG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WUuaW5kZXhPZignIy9kZWZpbml0aW9ucy8nKSA9PT0gMCkge1xuICAgIHJldHVybiBuYW1lLnN1YnN0cmluZygnIy9kZWZpbml0aW9ucy8nLmxlbmd0aCk7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIG5hbWU7XG4gIH1cbn07XG5cbiJdfQ==
-},{"_process":158,"lodash-compat/array/indexOf":50,"lodash-compat/lang/isPlainObject":146}],5:[function(require,module,exports){
+},{"_process":13,"lodash-compat/array/indexOf":53,"lodash-compat/lang/isPlainObject":149}],5:[function(require,module,exports){
'use strict';
var helpers = require('./helpers');
@@ -1920,6 +1876,7 @@ SwaggerHttp.prototype.execute = function (obj, opts) {
responseInterceptor(data);
};
+
if (_.isObject(obj) && _.isObject(obj.body)) {
// special processing for file uploads via jquery
if (obj.body.type && obj.body.type === 'formData'){
@@ -1932,14 +1889,7 @@ SwaggerHttp.prototype.execute = function (obj, opts) {
}
}
- obj = requestInterceptor(obj) || obj;
- if (obj.beforeSend) {
- obj.beforeSend(function(_obj) {
- client.execute(_obj || obj);
- });
- } else {
- client.execute(obj);
- }
+ client.execute(requestInterceptor(obj));
return (obj.deferred) ? obj.deferred.promise : obj;
};
@@ -2144,7 +2094,7 @@ SuperagentHttpClient.prototype.execute = function (obj) {
});
};
-},{"./helpers":4,"js-yaml":20,"lodash-compat/lang/isObject":145,"superagent":161}],6:[function(require,module,exports){
+},{"./helpers":4,"js-yaml":20,"lodash-compat/lang/isObject":148,"superagent":162}],6:[function(require,module,exports){
'use strict';
var SwaggerHttp = require('./http');
@@ -2158,9 +2108,7 @@ var _ = {
/**
* Resolves a spec's remote references
*/
-var Resolver = module.exports = function () {
- this.failedUrls = [];
-};
+var Resolver = module.exports = function () {};
Resolver.prototype.processAllOf = function(root, name, definition, resolutionTable, unresolvedRefs, spec) {
var i, location, property;
@@ -2413,8 +2361,7 @@ Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) {
// resolve anything that is local
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 ''
- if(!item.root || item.root === root) {
+ if(item.root === null || item.root === root) {
// local resolve
self.resolveItem(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, item);
processedCalls += 1;
@@ -2423,7 +2370,7 @@ Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) {
self.finish(spec, root, resolutionTable, resolvedRefs, unresolvedRefs, callback, true);
}
}
- else if(self.failedUrls.indexOf(item.root) === -1) {
+ else {
var obj = {
useJQuery: false, // TODO
url: item.root,
@@ -2434,8 +2381,6 @@ Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) {
on: {
error: function (error) {
processedCalls += 1;
- console.log('failed url: ' + obj.url);
- self.failedUrls.push(obj.url);
unresolvedRefs[item.key] = {
root: item.root,
location: item.location
@@ -2463,16 +2408,6 @@ Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) {
new SwaggerHttp().execute(obj, opts);
}
- else {
- processedCalls += 1;
- unresolvedRefs[item.key] = {
- root: item.root,
- location: item.location
- };
- if (processedCalls === expectedCalls) {
- self.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback);
- }
- }
}(toResolve[ii], spec, this));
}
@@ -2676,10 +2611,6 @@ Resolver.prototype.retainRoot = function(obj, root) {
Resolver.prototype.resolveInline = function (root, spec, property, resolutionTable, unresolvedRefs, location) {
var key = property.$ref, ref = property.$ref, i, p, p2, rs;
var rootTrimmed = false;
-
- root = root || '' // Guard against .split. @fehguy, you'll need to check if this logic fits
- // More imporantly is how do we gracefully handle relative urls, when provided just a 'spec', not a 'url' ?
-
if (ref) {
if(ref.indexOf('../') === 0) {
// reset root
@@ -2804,10 +2735,6 @@ Resolver.prototype.resolveTo = function (root, property, resolutionTable, locati
} else {
if(property && property.properties) {
var name = this.uniqueName('inline_model');
- if (property.title) {
- name = this.uniqueName(property.title);
- }
- delete property.title;
this.spec.definitions[name] = _.cloneDeep(property);
property['$ref'] = '#/definitions/' + name;
delete property.type;
@@ -2905,10 +2832,13 @@ Resolver.prototype.resolveAllOf = function(spec, obj, depth) {
obj[key] = output;
}
}
+ if(_.isObject(item)) {
+ this.resolveAllOf(spec, item, depth + 1);
+ }
}
};
-},{"./http":5,"lodash-compat/lang/cloneDeep":139,"lodash-compat/lang/isArray":141,"lodash-compat/lang/isObject":145}],7:[function(require,module,exports){
+},{"./http":5,"lodash-compat/lang/cloneDeep":142,"lodash-compat/lang/isArray":144,"lodash-compat/lang/isObject":148}],7:[function(require,module,exports){
'use strict';
var Helpers = require('./helpers');
@@ -3385,7 +3315,7 @@ function schemaToHTML(name, schema, models, modelPropertyMacro) {
var cProperty = _.cloneDeep(property);
var requiredClass = propertyIsRequired ? 'required' : '';
- var html = '
' + name + ' (';
+ var html = '
' + name + ' (';
var model;
var propDescription;
@@ -3427,12 +3357,12 @@ function schemaToHTML(name, schema, models, modelPropertyMacro) {
html += ' =
[\'' + cProperty.enum.join('\', \'') + '\']';
}
- return '
' + primitiveToOptionsHTML(cProperty, html);
+ return primitiveToOptionsHTML(cProperty, html);
}).join(',
');
+ }
- if (contents) {
- html += contents + '
';
- }
+ if (contents) {
+ html += contents + '
';
}
} else {
html += '