diff --git a/.travis.yml b/.travis.yml
index e275ba28..854331e8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,7 @@
language: node_js
node_js:
- '0.10'
+ - '0.12'
install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
diff --git a/dist/swagger-ui.js b/dist/swagger-ui.js
index e2c30f76..3fd0efda 100644
--- a/dist/swagger-ui.js
+++ b/dist/swagger-ui.js
@@ -5,11 +5,11 @@
* @license Apache 2.0
*/
var SwaggerUi,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- __hasProp = {}.hasOwnProperty;
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-SwaggerUi = (function(_super) {
- __extends(SwaggerUi, _super);
+SwaggerUi = (function(superClass) {
+ extend(SwaggerUi, superClass);
function SwaggerUi() {
return SwaggerUi.__super__.constructor.apply(this, arguments);
@@ -82,9 +82,9 @@ SwaggerUi = (function(_super) {
};
SwaggerUi.prototype.load = function() {
- var url, _ref;
- if ((_ref = this.mainView) != null) {
- _ref.clear();
+ var ref, url;
+ if ((ref = this.mainView) != null) {
+ ref.clear();
}
url = this.options.url;
if (url && url.indexOf("http") !== 0) {
@@ -969,11 +969,11 @@ this["Handlebars"]["templates"]["status_code"] = Handlebars.template({"compiler"
return buffer + "\n
| ";
},"useData":true});
var ApiKeyButton,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- __hasProp = {}.hasOwnProperty;
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-ApiKeyButton = (function(_super) {
- __extends(ApiKeyButton, _super);
+ApiKeyButton = (function(superClass) {
+ extend(ApiKeyButton, superClass);
function ApiKeyButton() {
return ApiKeyButton.__super__.constructor.apply(this, arguments);
@@ -1022,11 +1022,11 @@ ApiKeyButton = (function(_super) {
})(Backbone.View);
var BasicAuthButton,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- __hasProp = {}.hasOwnProperty;
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-BasicAuthButton = (function(_super) {
- __extends(BasicAuthButton, _super);
+BasicAuthButton = (function(superClass) {
+ extend(BasicAuthButton, superClass);
function BasicAuthButton() {
return BasicAuthButton.__super__.constructor.apply(this, arguments);
@@ -1077,11 +1077,11 @@ BasicAuthButton = (function(_super) {
})(Backbone.View);
var ContentTypeView,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- __hasProp = {}.hasOwnProperty;
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-ContentTypeView = (function(_super) {
- __extends(ContentTypeView, _super);
+ContentTypeView = (function(superClass) {
+ extend(ContentTypeView, superClass);
function ContentTypeView() {
return ContentTypeView.__super__.constructor.apply(this, arguments);
@@ -1106,11 +1106,11 @@ ContentTypeView = (function(_super) {
})(Backbone.View);
var HeaderView,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- __hasProp = {}.hasOwnProperty;
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-HeaderView = (function(_super) {
- __extends(HeaderView, _super);
+HeaderView = (function(superClass) {
+ extend(HeaderView, superClass);
function HeaderView() {
return HeaderView.__super__.constructor.apply(this, arguments);
@@ -1171,13 +1171,13 @@ HeaderView = (function(_super) {
})(Backbone.View);
var MainView,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- __hasProp = {}.hasOwnProperty;
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-MainView = (function(_super) {
+MainView = (function(superClass) {
var sorters;
- __extends(MainView, _super);
+ extend(MainView, superClass);
function MainView() {
return MainView.__super__.constructor.apply(this, arguments);
@@ -1193,14 +1193,14 @@ MainView = (function(_super) {
};
MainView.prototype.initialize = function(opts) {
- var auth, key, value, _ref;
+ var auth, key, ref, value;
if (opts == null) {
opts = {};
}
this.model.auths = [];
- _ref = this.model.securityDefinitions;
- for (key in _ref) {
- value = _ref[key];
+ ref = this.model.securityDefinitions;
+ for (key in ref) {
+ value = ref[key];
auth = {
name: key,
type: value.type,
@@ -1220,7 +1220,7 @@ MainView = (function(_super) {
};
MainView.prototype.render = function() {
- var auth, button, counter, id, name, resource, resources, _i, _len, _ref;
+ var auth, button, counter, i, id, len, name, ref, resource, resources;
if (this.model.securityDefinitions) {
for (name in this.model.securityDefinitions) {
auth = this.model.securityDefinitions[name];
@@ -1241,9 +1241,9 @@ MainView = (function(_super) {
$(this.el).html(Handlebars.templates.main(this.model));
resources = {};
counter = 0;
- _ref = this.model.apisArray;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- resource = _ref[_i];
+ ref = this.model.apisArray;
+ for (i = 0, len = ref.length; i < len; i++) {
+ resource = ref[i];
id = resource.name;
while (typeof resources[id] !== 'undefined') {
id = id + "_" + counter;
@@ -1284,11 +1284,11 @@ MainView = (function(_super) {
})(Backbone.View);
var OperationView,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- __hasProp = {}.hasOwnProperty;
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-OperationView = (function(_super) {
- __extends(OperationView, _super);
+OperationView = (function(superClass) {
+ extend(OperationView, superClass);
function OperationView() {
return OperationView.__super__.constructor.apply(this, arguments);
@@ -1350,7 +1350,7 @@ OperationView = (function(_super) {
};
OperationView.prototype.render = function() {
- var a, auth, auths, code, contentTypeModel, isMethodSubmissionSupported, k, key, modelAuths, o, param, ref, responseContentTypeView, responseSignatureView, schema, schemaObj, scopeIndex, signatureModel, statusCode, successResponse, type, v, value, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1, _ref2, _ref3, _ref4;
+ var a, auth, auths, code, contentTypeModel, isMethodSubmissionSupported, k, key, l, len, len1, len2, len3, len4, m, modelAuths, n, o, p, param, q, ref, ref1, ref2, ref3, ref4, ref5, responseContentTypeView, responseSignatureView, schema, schemaObj, scopeIndex, signatureModel, statusCode, successResponse, type, v, value;
isMethodSubmissionSupported = jQuery.inArray(this.model.method, this.model.supportedSubmitMethods()) >= 0;
if (!isMethodSubmissionSupported) {
this.model.isReadOnly = true;
@@ -1363,8 +1363,8 @@ OperationView = (function(_super) {
modelAuths = this.model.authorizations || this.model.security;
if (modelAuths) {
if (Array.isArray(modelAuths)) {
- for (_i = 0, _len = modelAuths.length; _i < _len; _i++) {
- auths = modelAuths[_i];
+ for (l = 0, len = modelAuths.length; l < len; l++) {
+ auths = modelAuths[l];
for (key in auths) {
auth = auths[key];
for (a in this.auths) {
@@ -1372,9 +1372,9 @@ OperationView = (function(_super) {
if (auth.type === 'oauth2') {
this.model.oauth = {};
this.model.oauth.scopes = [];
- _ref = auth.value.scopes;
- for (k in _ref) {
- v = _ref[k];
+ ref1 = auth.value.scopes;
+ for (k in ref1) {
+ v = ref1[k];
scopeIndex = auths[key].indexOf(k);
if (scopeIndex >= 0) {
o = {
@@ -1398,8 +1398,8 @@ OperationView = (function(_super) {
if (this.model.oauth.scopes === void 0) {
this.model.oauth.scopes = [];
}
- for (_j = 0, _len1 = v.length; _j < _len1; _j++) {
- o = v[_j];
+ for (m = 0, len1 = v.length; m < len1; m++) {
+ o = v[m];
this.model.oauth.scopes.push(o);
}
}
@@ -1408,9 +1408,9 @@ OperationView = (function(_super) {
}
if (typeof this.model.responses !== 'undefined') {
this.model.responseMessages = [];
- _ref1 = this.model.responses;
- for (code in _ref1) {
- value = _ref1[code];
+ ref2 = this.model.responses;
+ for (code in ref2) {
+ value = ref2[code];
schema = null;
schemaObj = this.model.responses[code].schema;
if (schemaObj && schemaObj['$ref']) {
@@ -1466,9 +1466,9 @@ OperationView = (function(_super) {
};
contentTypeModel.consumes = this.model.consumes;
contentTypeModel.produces = this.model.produces;
- _ref2 = this.model.parameters;
- for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
- param = _ref2[_k];
+ ref3 = this.model.parameters;
+ for (n = 0, len2 = ref3.length; n < len2; n++) {
+ param = ref3[n];
type = param.type || param.dataType || '';
if (typeof type === 'undefined') {
schema = param.schema;
@@ -1492,14 +1492,14 @@ OperationView = (function(_super) {
model: contentTypeModel
});
$('.response-content-type', $(this.el)).append(responseContentTypeView.render().el);
- _ref3 = this.model.parameters;
- for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {
- param = _ref3[_l];
+ ref4 = this.model.parameters;
+ for (p = 0, len3 = ref4.length; p < len3; p++) {
+ param = ref4[p];
this.addParameter(param, contentTypeModel.consumes);
}
- _ref4 = this.model.responseMessages;
- for (_m = 0, _len4 = _ref4.length; _m < _len4; _m++) {
- statusCode = _ref4[_m];
+ ref5 = this.model.responseMessages;
+ for (q = 0, len4 = ref5.length; q < len4; q++) {
+ statusCode = ref5[q];
this.addStatusCode(statusCode);
}
return this;
@@ -1526,7 +1526,7 @@ OperationView = (function(_super) {
};
OperationView.prototype.submitOperation = function(e) {
- var error_free, form, isFileUpload, map, o, opts, val, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2;
+ var error_free, form, isFileUpload, l, len, len1, len2, m, map, n, o, opts, ref1, ref2, ref3, val;
if (e != null) {
e.preventDefault();
}
@@ -1566,9 +1566,9 @@ OperationView = (function(_super) {
parent: this
};
isFileUpload = false;
- _ref = form.find("input");
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- o = _ref[_i];
+ ref1 = form.find("input");
+ for (l = 0, len = ref1.length; l < len; l++) {
+ o = ref1[l];
if ((o.value != null) && jQuery.trim(o.value).length > 0) {
map[o.name] = o.value;
}
@@ -1577,16 +1577,16 @@ OperationView = (function(_super) {
isFileUpload = true;
}
}
- _ref1 = form.find("textarea");
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
- o = _ref1[_j];
+ ref2 = form.find("textarea");
+ for (m = 0, len1 = ref2.length; m < len1; m++) {
+ o = ref2[m];
if ((o.value != null) && jQuery.trim(o.value).length > 0) {
map[o.name] = o.value;
}
}
- _ref2 = form.find("select");
- for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
- o = _ref2[_k];
+ ref3 = form.find("select");
+ for (n = 0, len2 = ref3.length; n < len2; n++) {
+ o = ref3[n];
val = this.getSelectedValue(o);
if ((val != null) && jQuery.trim(val).length > 0) {
map[o.name] = val;
@@ -1608,19 +1608,19 @@ OperationView = (function(_super) {
};
OperationView.prototype.handleFileUpload = function(map, form) {
- var bodyParam, el, headerParams, o, obj, param, params, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3;
- _ref = form.serializeArray();
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- o = _ref[_i];
+ var bodyParam, el, headerParams, l, len, len1, len2, len3, m, n, o, obj, p, param, params, ref1, ref2, ref3, ref4;
+ ref1 = form.serializeArray();
+ for (l = 0, len = ref1.length; l < len; l++) {
+ o = ref1[l];
if ((o.value != null) && jQuery.trim(o.value).length > 0) {
map[o.name] = o.value;
}
}
bodyParam = new FormData();
params = 0;
- _ref1 = this.model.parameters;
- for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
- param = _ref1[_j];
+ ref2 = this.model.parameters;
+ for (m = 0, len1 = ref2.length; m < len1; m++) {
+ param = ref2[m];
if (param.paramType === 'form' || param["in"] === 'formData') {
if (param.type.toLowerCase() !== 'file' && map[param.name] !== void 0) {
bodyParam.append(param.name, map[param.name]);
@@ -1628,16 +1628,16 @@ OperationView = (function(_super) {
}
}
headerParams = {};
- _ref2 = this.model.parameters;
- for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
- param = _ref2[_k];
+ ref3 = this.model.parameters;
+ for (n = 0, len2 = ref3.length; n < len2; n++) {
+ param = ref3[n];
if (param.paramType === 'header') {
headerParams[param.name] = map[param.name];
}
}
- _ref3 = form.find('input[type~="file"]');
- for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {
- el = _ref3[_l];
+ ref4 = form.find('input[type~="file"]');
+ for (p = 0, len3 = ref4.length; p < len3; p++) {
+ el = ref4[p];
if (typeof el.files[0] !== 'undefined') {
bodyParam.append($(el).attr('name'), el.files[0]);
params += 1;
@@ -1681,11 +1681,11 @@ OperationView = (function(_super) {
};
OperationView.prototype.wrap = function(data) {
- var h, headerArray, headers, i, o, _i, _len;
+ var h, headerArray, headers, i, l, len, o;
headers = {};
headerArray = data.getAllResponseHeaders().split("\r");
- for (_i = 0, _len = headerArray.length; _i < _len; _i++) {
- i = headerArray[_i];
+ for (l = 0, len = headerArray.length; l < len; l++) {
+ i = headerArray[l];
h = i.match(/^([^:]*?):(.*)$/);
if (!h) {
h = [];
@@ -1706,14 +1706,14 @@ OperationView = (function(_super) {
};
OperationView.prototype.getSelectedValue = function(select) {
- var opt, options, _i, _len, _ref;
+ var l, len, opt, options, ref1;
if (!select.multiple) {
return select.value;
} else {
options = [];
- _ref = select.options;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- opt = _ref[_i];
+ ref1 = select.options;
+ for (l = 0, len = ref1.length; l < len; l++) {
+ opt = ref1[l];
if (opt.selected) {
options.push(opt.value);
}
@@ -1749,7 +1749,7 @@ OperationView = (function(_super) {
};
OperationView.prototype.formatXml = function(xml) {
- var contexp, formatted, indent, lastType, lines, ln, pad, reg, transitions, wsexp, _fn, _i, _len;
+ var contexp, fn, formatted, indent, l, lastType, len, lines, ln, pad, reg, transitions, wsexp;
reg = /(>)(<)(\/*)/g;
wsexp = /[ ]*(.*)[ ]+\n/g;
contexp = /(<.+>)(.+\n)/g;
@@ -1777,7 +1777,7 @@ OperationView = (function(_super) {
'other->opening': 0,
'other->other': 0
};
- _fn = function(ln) {
+ fn = function(ln) {
var fromTo, j, key, padding, type, types, value;
types = {
single: Boolean(ln.match(/<.+\/>/)),
@@ -1785,15 +1785,15 @@ OperationView = (function(_super) {
opening: Boolean(ln.match(/<[^!?].*>/))
};
type = ((function() {
- var _results;
- _results = [];
+ var results;
+ results = [];
for (key in types) {
value = types[key];
if (value) {
- _results.push(key);
+ results.push(key);
}
}
- return _results;
+ return results;
})())[0];
type = type === void 0 ? 'other' : type;
fromTo = lastType + '->' + type;
@@ -1801,12 +1801,12 @@ OperationView = (function(_super) {
padding = '';
indent += transitions[fromTo];
padding = ((function() {
- var _j, _ref, _results;
- _results = [];
- for (j = _j = 0, _ref = indent; 0 <= _ref ? _j < _ref : _j > _ref; j = 0 <= _ref ? ++_j : --_j) {
- _results.push(' ');
+ var m, ref1, results;
+ results = [];
+ for (j = m = 0, ref1 = indent; 0 <= ref1 ? m < ref1 : m > ref1; j = 0 <= ref1 ? ++m : --m) {
+ results.push(' ');
}
- return _results;
+ return results;
})()).join('');
if (fromTo === 'opening->closing') {
return formatted = formatted.substr(0, formatted.length - 1) + ln + '\n';
@@ -1814,9 +1814,9 @@ OperationView = (function(_super) {
return formatted += padding + ln + '\n';
}
};
- for (_i = 0, _len = lines.length; _i < _len; _i++) {
- ln = lines[_i];
- _fn(ln);
+ for (l = 0, len = lines.length; l < len; l++) {
+ ln = lines[l];
+ fn(ln);
}
return formatted;
};
@@ -1898,11 +1898,11 @@ OperationView = (function(_super) {
})(Backbone.View);
var ParameterContentTypeView,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- __hasProp = {}.hasOwnProperty;
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-ParameterContentTypeView = (function(_super) {
- __extends(ParameterContentTypeView, _super);
+ParameterContentTypeView = (function(superClass) {
+ extend(ParameterContentTypeView, superClass);
function ParameterContentTypeView() {
return ParameterContentTypeView.__super__.constructor.apply(this, arguments);
@@ -1927,11 +1927,11 @@ ParameterContentTypeView = (function(_super) {
})(Backbone.View);
var ParameterView,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- __hasProp = {}.hasOwnProperty;
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-ParameterView = (function(_super) {
- __extends(ParameterView, _super);
+ParameterView = (function(superClass) {
+ extend(ParameterView, superClass);
function ParameterView() {
return ParameterView.__super__.constructor.apply(this, arguments);
@@ -2036,11 +2036,11 @@ ParameterView = (function(_super) {
})(Backbone.View);
var ResourceView,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- __hasProp = {}.hasOwnProperty;
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-ResourceView = (function(_super) {
- __extends(ResourceView, _super);
+ResourceView = (function(superClass) {
+ extend(ResourceView, superClass);
function ResourceView() {
return ResourceView.__super__.constructor.apply(this, arguments);
@@ -2060,12 +2060,12 @@ ResourceView = (function(_super) {
};
ResourceView.prototype.render = function() {
- var counter, id, methods, operation, _i, _len, _ref;
+ var counter, i, id, len, methods, operation, ref;
methods = {};
$(this.el).html(Handlebars.templates.resource(this.model));
- _ref = this.model.operationsArray;
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- operation = _ref[_i];
+ ref = this.model.operationsArray;
+ for (i = 0, len = ref.length; i < len; i++) {
+ operation = ref[i];
counter = 0;
id = operation.nickname;
while (typeof methods[id] !== 'undefined') {
@@ -2107,11 +2107,11 @@ ResourceView = (function(_super) {
})(Backbone.View);
var ResponseContentTypeView,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- __hasProp = {}.hasOwnProperty;
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-ResponseContentTypeView = (function(_super) {
- __extends(ResponseContentTypeView, _super);
+ResponseContentTypeView = (function(superClass) {
+ extend(ResponseContentTypeView, superClass);
function ResponseContentTypeView() {
return ResponseContentTypeView.__super__.constructor.apply(this, arguments);
@@ -2136,11 +2136,11 @@ ResponseContentTypeView = (function(_super) {
})(Backbone.View);
var SignatureView,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- __hasProp = {}.hasOwnProperty;
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-SignatureView = (function(_super) {
- __extends(SignatureView, _super);
+SignatureView = (function(superClass) {
+ extend(SignatureView, superClass);
function SignatureView() {
return SignatureView.__super__.constructor.apply(this, arguments);
@@ -2208,11 +2208,11 @@ SignatureView = (function(_super) {
})(Backbone.View);
var StatusCodeView,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- __hasProp = {}.hasOwnProperty;
+ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ hasProp = {}.hasOwnProperty;
-StatusCodeView = (function(_super) {
- __extends(StatusCodeView, _super);
+StatusCodeView = (function(superClass) {
+ extend(StatusCodeView, superClass);
function StatusCodeView() {
return StatusCodeView.__super__.constructor.apply(this, arguments);
diff --git a/dist/swagger-ui.min.js b/dist/swagger-ui.min.js
index ae311bc9..5b621ec4 100644
--- a/dist/swagger-ui.min.js
+++ b/dist/swagger-ui.min.js
@@ -1,2 +1,2 @@
-function clippyCopiedCallback(){$("#api_key_copied").fadeIn().delay(1e3).fadeOut()}var SwaggerUi,__extends=function(e,t){function n(){this.constructor=e}for(var a in t)__hasProp.call(t,a)&&(e[a]=t[a]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},__hasProp={}.hasOwnProperty;SwaggerUi=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return __extends(t,e),t.prototype.dom_id="swagger_ui",t.prototype.options=null,t.prototype.api=null,t.prototype.headerView=null,t.prototype.mainView=null,t.prototype.initialize=function(e){return null==e&&(e={}),null!=e.dom_id&&(this.dom_id=e.dom_id,delete e.dom_id),null==e.supportedSubmitMethods&&(e.supportedSubmitMethods=["get","put","post","delete","head","options","patch"]),null==$("#"+this.dom_id)&&$("body").append(''),this.options=e,marked.setOptions({gfm:!0}),this.options.success=function(e){return function(){return e.render()}}(this),this.options.progress=function(e){return function(t){return e.showMessage(t)}}(this),this.options.failure=function(e){return function(t){return e.onLoadFailure(t)}}(this),this.headerView=new HeaderView({el:$("#header")}),this.headerView.on("update-swagger-ui",function(e){return function(t){return e.updateSwaggerUi(t)}}(this))},t.prototype.setOption=function(e,t){return this.options[e]=t},t.prototype.getOption=function(e){return this.options[e]},t.prototype.updateSwaggerUi=function(e){return this.options.url=e.url,this.load()},t.prototype.load=function(){var e,t;return null!=(t=this.mainView)&&t.clear(),e=this.options.url,e&&0!==e.indexOf("http")&&(e=this.buildUrl(window.location.href.toString(),e)),this.options.url=e,this.headerView.update(e),this.api=new SwaggerClient(this.options)},t.prototype.collapseAll=function(){return Docs.collapseEndpointListForResource("")},t.prototype.listAll=function(){return Docs.collapseOperationsForResource("")},t.prototype.expandAll=function(){return Docs.expandOperationsForResource("")},t.prototype.render=function(){switch(this.showMessage("Finished Loading Resource Information. Rendering Swagger UI..."),this.mainView=new MainView({model:this.api,el:$("#"+this.dom_id),swaggerOptions:this.options}).render(),this.showMessage(),this.options.docExpansion){case"full":this.expandAll();break;case"list":this.listAll()}return this.renderGFM(),this.options.onComplete&&this.options.onComplete(this.api,this),setTimeout(function(){return function(){return Docs.shebang()}}(this),100)},t.prototype.buildUrl=function(e,t){var n,a;return 0===t.indexOf("/")?(a=e.split("/"),e=a[0]+"//"+a[2],e+t):(n=e.length,e.indexOf("?")>-1&&(n=Math.min(n,e.indexOf("?"))),e.indexOf("#")>-1&&(n=Math.min(n,e.indexOf("#"))),e=e.substring(0,n),-1!==e.indexOf("/",e.length-1)?e+t:e+"/"+t)},t.prototype.showMessage=function(e){return null==e&&(e=""),$("#message-bar").removeClass("message-fail"),$("#message-bar").addClass("message-success"),$("#message-bar").html(e)},t.prototype.onLoadFailure=function(e){var t;return null==e&&(e=""),$("#message-bar").removeClass("message-success"),$("#message-bar").addClass("message-fail"),t=$("#message-bar").html(e),null!=this.options.onFailure&&this.options.onFailure(e),t},t.prototype.renderGFM=function(e){return null==e&&(e=""),$(".markdown").each(function(){return $(this).html(marked($(this).html()))})},t}(Backbone.Router),window.SwaggerUi=SwaggerUi,this.Handlebars=this.Handlebars||{},this.Handlebars.templates=this.Handlebars.templates||{},this.Handlebars.templates.apikey_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i="function",r=t.helperMissing,l=this.escapeExpression;return"\n\n\n'},useData:!0}),this.Handlebars.templates.basic_auth_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(){return'\n\n\n'},useData:!0}),this.Handlebars.templates.content_type=Handlebars.template({1:function(e,t,n,a){var s,i="";return s=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=s&&(i+=s),i},2:function(e){var t,n=this.lambda,a=' \n"},4:function(){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,a){var s,i='\n\n"},useData:!0}),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""==$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),log=function(){log.history=log.history||[],log.history.push(arguments),this.console&&console.log(Array.prototype.slice.call(arguments)[0])},Function.prototype.bind&&console&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call);var Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:var t="resource_"+e[0];Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1});break;case 2:Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1});var n=e.join("_"),a=n+"_content";Docs.expandOperation($("#"+a)),$("#"+n).slideto({highlight:!1})}},toggleEndpointListForResource:function(e){var t=$("li#resource_"+Docs.escapeResourceName(e)+" ul.endpoints");t.is(":visible")?Docs.collapseEndpointListForResource(e):Docs.expandEndpointListForResource(e)},expandEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideDown();$("li#resource_"+e).addClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideDown()},collapseEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideUp();$("li#resource_"+e).removeClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideUp()},expandOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideDown():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideUp():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(e){return e.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(e){e.slideDown()},collapseOperation:function(e){e.slideUp()}};Handlebars.registerHelper("sanitize",function(e){return e=e.replace(/