Merge pull request #925 from swagger-api/feature/legacy-cleanup
Feature/legacy cleanup
This commit is contained in:
2
dist/index.html
vendored
2
dist/index.html
vendored
@@ -28,7 +28,7 @@
|
|||||||
if (url && url.length > 1) {
|
if (url && url.length > 1) {
|
||||||
url = decodeURIComponent(url[1]);
|
url = decodeURIComponent(url[1]);
|
||||||
} else {
|
} else {
|
||||||
url = "http://petstore.swagger.wordnik.com/v2/swagger.json";
|
url = "http://petstore.swagger.io/v2/swagger.json";
|
||||||
}
|
}
|
||||||
window.swaggerUi = new SwaggerUi({
|
window.swaggerUi = new SwaggerUi({
|
||||||
url: url,
|
url: url,
|
||||||
|
|||||||
85
dist/lib/swagger-client.js
vendored
85
dist/lib/swagger-client.js
vendored
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* swagger-client - swagger.js is a javascript client for use with swaggering APIs.
|
* swagger-client - swagger.js is a javascript client for use with swaggering APIs.
|
||||||
* @version v2.1.2-M1
|
* @version v2.1.3-M1
|
||||||
* @link http://swagger.io
|
* @link http://swagger.io
|
||||||
* @license apache 2.0
|
* @license apache 2.0
|
||||||
*/
|
*/
|
||||||
@@ -82,10 +82,10 @@ SwaggerAuthorizations.prototype.remove = function(name) {
|
|||||||
|
|
||||||
SwaggerAuthorizations.prototype.apply = function (obj, authorizations) {
|
SwaggerAuthorizations.prototype.apply = function (obj, authorizations) {
|
||||||
var status = null;
|
var status = null;
|
||||||
var key, value, result;
|
var key, name, value, result;
|
||||||
|
|
||||||
// if the "authorizations" key is undefined, or has an empty array, add all keys
|
// if the "authorizations" key is undefined, or has an empty array, add all keys
|
||||||
if (typeof authorizations === 'undefined' || Object.keys(authorizations).length == 0) {
|
if (typeof authorizations === 'undefined' || Object.keys(authorizations).length === 0) {
|
||||||
for (key in this.authz) {
|
for (key in this.authz) {
|
||||||
value = this.authz[key];
|
value = this.authz[key];
|
||||||
result = value.apply(obj, authorizations);
|
result = value.apply(obj, authorizations);
|
||||||
@@ -280,6 +280,10 @@ PrimitiveModel.prototype.getMockSignature = function(modelsToIgnore) {
|
|||||||
}
|
}
|
||||||
return returnVal;
|
return returnVal;
|
||||||
};
|
};
|
||||||
|
var addModel = function(name, model) {
|
||||||
|
models[name] = model;
|
||||||
|
};
|
||||||
|
|
||||||
var SwaggerClient = function(url, options) {
|
var SwaggerClient = function(url, options) {
|
||||||
this.isBuilt = false;
|
this.isBuilt = false;
|
||||||
this.url = null;
|
this.url = null;
|
||||||
@@ -291,13 +295,14 @@ var SwaggerClient = function(url, options) {
|
|||||||
this.isValid = false;
|
this.isValid = false;
|
||||||
this.info = null;
|
this.info = null;
|
||||||
this.useJQuery = false;
|
this.useJQuery = false;
|
||||||
|
this.resourceCount = 0;
|
||||||
|
|
||||||
if(typeof url !== 'undefined')
|
if(typeof url !== 'undefined')
|
||||||
return this.initialize(url, options);
|
return this.initialize(url, options);
|
||||||
};
|
};
|
||||||
|
|
||||||
SwaggerClient.prototype.initialize = function (url, options) {
|
SwaggerClient.prototype.initialize = function (url, options) {
|
||||||
this.models = models;
|
this.models = models = {};
|
||||||
|
|
||||||
options = (options||{});
|
options = (options||{});
|
||||||
|
|
||||||
@@ -386,7 +391,6 @@ SwaggerClient.prototype.build = function(mock) {
|
|||||||
return obj;
|
return obj;
|
||||||
new SwaggerHttp().execute(obj);
|
new SwaggerHttp().execute(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -502,8 +506,11 @@ SwaggerClient.prototype.buildFromSpec = function(response) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.isBuilt = true;
|
this.isBuilt = true;
|
||||||
if (this.success)
|
if (this.success) {
|
||||||
|
this.isValid = true;
|
||||||
|
this.isBuilt = true;
|
||||||
this.success();
|
this.success();
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -592,18 +599,18 @@ var Operation = function(parent, scheme, operationId, httpMethod, path, args, de
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var i, model;
|
||||||
|
|
||||||
if(definitions) {
|
if(definitions) {
|
||||||
// add to global models
|
// add to global models
|
||||||
var key;
|
var key;
|
||||||
for(key in this.definitions) {
|
for(key in this.definitions) {
|
||||||
var model = new Model(key, definitions[key]);
|
model = new Model(key, definitions[key]);
|
||||||
if(model) {
|
if(model) {
|
||||||
models[key] = model;
|
models[key] = model;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var i;
|
|
||||||
for(i = 0; i < this.parameters.length; i++) {
|
for(i = 0; i < this.parameters.length; i++) {
|
||||||
var param = this.parameters[i];
|
var param = this.parameters[i];
|
||||||
if(param.type === 'array') {
|
if(param.type === 'array') {
|
||||||
@@ -641,7 +648,7 @@ var Operation = function(parent, scheme, operationId, httpMethod, path, args, de
|
|||||||
param.responseClassSignature = param.signature;
|
param.responseClassSignature = param.signature;
|
||||||
}
|
}
|
||||||
|
|
||||||
var defaultResponseCode, response, model, responses = this.responses;
|
var defaultResponseCode, response, responses = this.responses;
|
||||||
|
|
||||||
if(responses['200']) {
|
if(responses['200']) {
|
||||||
response = responses['200'];
|
response = responses['200'];
|
||||||
@@ -995,9 +1002,9 @@ Operation.prototype.execute = function(arg1, arg2, arg3, arg4, parent) {
|
|||||||
var allHeaders = this.getHeaderParams(args);
|
var allHeaders = this.getHeaderParams(args);
|
||||||
var contentTypeHeaders = this.setContentTypes(args, opts);
|
var contentTypeHeaders = this.setContentTypes(args, opts);
|
||||||
|
|
||||||
var headers = {};
|
var headers = {}, attrname;
|
||||||
for (var attrname in allHeaders) { headers[attrname] = allHeaders[attrname]; }
|
for (attrname in allHeaders) { headers[attrname] = allHeaders[attrname]; }
|
||||||
for (var attrname in contentTypeHeaders) { headers[attrname] = contentTypeHeaders[attrname]; }
|
for (attrname in contentTypeHeaders) { headers[attrname] = contentTypeHeaders[attrname]; }
|
||||||
|
|
||||||
var body = this.getBody(headers, args);
|
var body = this.getBody(headers, args);
|
||||||
var url = this.urlify(args);
|
var url = this.urlify(args);
|
||||||
@@ -1439,7 +1446,7 @@ Property.prototype.toString = function() {
|
|||||||
type = '';
|
type = '';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.schema.type;
|
type = this.schema.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.default)
|
if (this.default)
|
||||||
@@ -1500,7 +1507,7 @@ Property.prototype.toString = function() {
|
|||||||
|
|
||||||
optionHtml = function(label, value) {
|
optionHtml = function(label, value) {
|
||||||
return '<tr><td class="optionName">' + label + ':</td><td>' + value + '</td></tr>';
|
return '<tr><td class="optionName">' + label + ':</td><td>' + value + '</td></tr>';
|
||||||
}
|
};
|
||||||
|
|
||||||
typeFromJsonSchema = function(type, format) {
|
typeFromJsonSchema = function(type, format) {
|
||||||
var str;
|
var str;
|
||||||
@@ -1533,7 +1540,7 @@ var cookies = {};
|
|||||||
var models = {};
|
var models = {};
|
||||||
|
|
||||||
SwaggerClient.prototype.buildFrom1_2Spec = function (response) {
|
SwaggerClient.prototype.buildFrom1_2Spec = function (response) {
|
||||||
if (response.apiVersion != null) {
|
if (response.apiVersion !== null) {
|
||||||
this.apiVersion = response.apiVersion;
|
this.apiVersion = response.apiVersion;
|
||||||
}
|
}
|
||||||
this.apis = {};
|
this.apis = {};
|
||||||
@@ -1569,6 +1576,7 @@ SwaggerClient.prototype.buildFrom1_2Spec = function (response) {
|
|||||||
this.apisArray.push(res);
|
this.apisArray.push(res);
|
||||||
} else {
|
} else {
|
||||||
var k;
|
var k;
|
||||||
|
this.expectedResourceCount = response.apis.length;
|
||||||
for (k = 0; k < response.apis.length; k++) {
|
for (k = 0; k < response.apis.length; k++) {
|
||||||
var resource = response.apis[k];
|
var resource = response.apis[k];
|
||||||
res = new SwaggerResource(resource, this);
|
res = new SwaggerResource(resource, this);
|
||||||
@@ -1577,15 +1585,21 @@ SwaggerClient.prototype.buildFrom1_2Spec = function (response) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.isValid = true;
|
this.isValid = true;
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
|
||||||
|
SwaggerClient.prototype.finish = function() {
|
||||||
if (typeof this.success === 'function') {
|
if (typeof this.success === 'function') {
|
||||||
|
this.isValid = true;
|
||||||
|
this.isBuilt = true;
|
||||||
|
this.selfReflect();
|
||||||
this.success();
|
this.success();
|
||||||
}
|
}
|
||||||
return this;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
SwaggerClient.prototype.buildFrom1_1Spec = function (response) {
|
SwaggerClient.prototype.buildFrom1_1Spec = function (response) {
|
||||||
log('This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info');
|
log('This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info');
|
||||||
if (response.apiVersion != null)
|
if (response.apiVersion !== null)
|
||||||
this.apiVersion = response.apiVersion;
|
this.apiVersion = response.apiVersion;
|
||||||
this.apis = {};
|
this.apis = {};
|
||||||
this.apisArray = [];
|
this.apisArray = [];
|
||||||
@@ -1631,7 +1645,7 @@ SwaggerClient.prototype.buildFrom1_1Spec = function (response) {
|
|||||||
|
|
||||||
SwaggerClient.prototype.convertInfo = function (resp) {
|
SwaggerClient.prototype.convertInfo = function (resp) {
|
||||||
if(typeof resp == 'object') {
|
if(typeof resp == 'object') {
|
||||||
var info = {}
|
var info = {};
|
||||||
|
|
||||||
info.title = resp.title;
|
info.title = resp.title;
|
||||||
info.description = resp.description;
|
info.description = resp.description;
|
||||||
@@ -1660,9 +1674,6 @@ SwaggerClient.prototype.selfReflect = function () {
|
|||||||
}
|
}
|
||||||
this.setConsolidatedModels();
|
this.setConsolidatedModels();
|
||||||
this.ready = true;
|
this.ready = true;
|
||||||
if (typeof this.success === 'function') {
|
|
||||||
return this.success();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
SwaggerClient.prototype.setConsolidatedModels = function () {
|
SwaggerClient.prototype.setConsolidatedModels = function () {
|
||||||
@@ -1702,7 +1713,7 @@ var SwaggerResource = function (resourceObj, api) {
|
|||||||
this.operations = {};
|
this.operations = {};
|
||||||
this.operationsArray = [];
|
this.operationsArray = [];
|
||||||
this.modelsArray = [];
|
this.modelsArray = [];
|
||||||
this.models = {};
|
this.models = api.models || {};
|
||||||
this.rawModels = {};
|
this.rawModels = {};
|
||||||
this.useJQuery = (typeof api.useJQuery !== 'undefined') ? api.useJQuery : null;
|
this.useJQuery = (typeof api.useJQuery !== 'undefined') ? api.useJQuery : null;
|
||||||
|
|
||||||
@@ -1728,9 +1739,11 @@ var SwaggerResource = function (resourceObj, api) {
|
|||||||
on: {
|
on: {
|
||||||
response: function (resp) {
|
response: function (resp) {
|
||||||
var responseObj = resp.obj || JSON.parse(resp.data);
|
var responseObj = resp.obj || JSON.parse(resp.data);
|
||||||
|
_this.api.resourceCount += 1;
|
||||||
return _this.addApiDeclaration(responseObj);
|
return _this.addApiDeclaration(responseObj);
|
||||||
},
|
},
|
||||||
error: function (response) {
|
error: function (response) {
|
||||||
|
_this.api.resourceCount += 1;
|
||||||
return _this.api.fail('Unable to read api \'' +
|
return _this.api.fail('Unable to read api \'' +
|
||||||
_this.name + '\' from path ' + _this.url + ' (server returned ' + response.statusText + ')');
|
_this.name + '\' from path ' + _this.url + ' (server returned ' + response.statusText + ')');
|
||||||
}
|
}
|
||||||
@@ -1784,7 +1797,9 @@ SwaggerResource.prototype.addApiDeclaration = function (response) {
|
|||||||
}
|
}
|
||||||
this.api[this.name] = this;
|
this.api[this.name] = this;
|
||||||
this.ready = true;
|
this.ready = true;
|
||||||
return this.api.selfReflect();
|
if(this.api.resourceCount === this.api.expectedResourceCount)
|
||||||
|
this.api.finish();
|
||||||
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
SwaggerResource.prototype.addModels = function (models) {
|
SwaggerResource.prototype.addModels = function (models) {
|
||||||
@@ -2077,7 +2092,7 @@ var SwaggerOperation = function (nickname, path, method, parameters, summary, no
|
|||||||
|
|
||||||
this.path = this.path.replace('{format}', 'json');
|
this.path = this.path.replace('{format}', 'json');
|
||||||
this.method = this.method.toLowerCase();
|
this.method = this.method.toLowerCase();
|
||||||
this.isGetMethod = this.method === 'GET';
|
this.isGetMethod = this.method === 'get';
|
||||||
|
|
||||||
var i, j, v;
|
var i, j, v;
|
||||||
this.resourceName = this.resource.name;
|
this.resourceName = this.resource.name;
|
||||||
@@ -2128,17 +2143,17 @@ var SwaggerOperation = function (nickname, path, method, parameters, summary, no
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (param.allowableValues != null) {
|
else if (param.allowableValues) {
|
||||||
if (param.allowableValues.valueType === 'RANGE')
|
if (param.allowableValues.valueType === 'RANGE')
|
||||||
param.isRange = true;
|
param.isRange = true;
|
||||||
else
|
else
|
||||||
param.isList = true;
|
param.isList = true;
|
||||||
if (param.allowableValues != null) {
|
if (param.allowableValues) {
|
||||||
param.allowableValues.descriptiveValues = [];
|
param.allowableValues.descriptiveValues = [];
|
||||||
if (param.allowableValues.values) {
|
if (param.allowableValues.values) {
|
||||||
for (j = 0; j < param.allowableValues.values.length; j++) {
|
for (j = 0; j < param.allowableValues.values.length; j++) {
|
||||||
v = param.allowableValues.values[j];
|
v = param.allowableValues.values[j];
|
||||||
if (param.defaultValue != null) {
|
if (param.defaultValue !== null) {
|
||||||
param.allowableValues.descriptiveValues.push({
|
param.allowableValues.descriptiveValues.push({
|
||||||
value: String(v),
|
value: String(v),
|
||||||
isDefault: (v === param.defaultValue)
|
isDefault: (v === param.defaultValue)
|
||||||
@@ -2208,7 +2223,7 @@ SwaggerOperation.prototype.getSampleJSON = function (type, models) {
|
|||||||
var isPrimitive, listType, val;
|
var isPrimitive, listType, val;
|
||||||
listType = this.isListType(type);
|
listType = this.isListType(type);
|
||||||
isPrimitive = ((typeof listType !== 'undefined') && models[listType]) || (typeof models[type] !== 'undefined') ? false : true;
|
isPrimitive = ((typeof listType !== 'undefined') && models[listType]) || (typeof models[type] !== 'undefined') ? false : true;
|
||||||
val = isPrimitive ? void 0 : (listType != null ? models[listType].createJSONSample() : models[type].createJSONSample());
|
val = isPrimitive ? void 0 : (listType ? models[listType].createJSONSample() : models[type].createJSONSample());
|
||||||
if (val) {
|
if (val) {
|
||||||
val = listType ? [val] : val;
|
val = listType ? [val] : val;
|
||||||
if (typeof val == 'string')
|
if (typeof val == 'string')
|
||||||
@@ -2243,7 +2258,7 @@ SwaggerOperation.prototype['do'] = function (args, opts, callback, error) {
|
|||||||
callback = function (response) {
|
callback = function (response) {
|
||||||
var content;
|
var content;
|
||||||
content = null;
|
content = null;
|
||||||
if (response != null) {
|
if (response !== null) {
|
||||||
content = response.data;
|
content = response.data;
|
||||||
} else {
|
} else {
|
||||||
content = 'no data';
|
content = 'no data';
|
||||||
@@ -2254,7 +2269,7 @@ SwaggerOperation.prototype['do'] = function (args, opts, callback, error) {
|
|||||||
|
|
||||||
params = {};
|
params = {};
|
||||||
params.headers = [];
|
params.headers = [];
|
||||||
if (args.headers != null) {
|
if (args.headers) {
|
||||||
params.headers = args.headers;
|
params.headers = args.headers;
|
||||||
delete args.headers;
|
delete args.headers;
|
||||||
}
|
}
|
||||||
@@ -2375,7 +2390,7 @@ SwaggerOperation.prototype.urlify = function (args) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((queryParams != null) && queryParams.length > 0)
|
if ((queryParams) && queryParams.length > 0)
|
||||||
url += '?' + queryParams;
|
url += '?' + queryParams;
|
||||||
return url;
|
return url;
|
||||||
};
|
};
|
||||||
@@ -2584,7 +2599,7 @@ var SwaggerRequest = function (type, url, params, opts, successCallback, errorCa
|
|||||||
}
|
}
|
||||||
|
|
||||||
var obj;
|
var obj;
|
||||||
if (!((this.headers != null) && (this.headers.mock != null))) {
|
if (!((this.headers) && (this.headers.mock))) {
|
||||||
obj = {
|
obj = {
|
||||||
url: this.url,
|
url: this.url,
|
||||||
method: this.type,
|
method: this.type,
|
||||||
@@ -2953,7 +2968,9 @@ e.ApiKeyAuthorization = ApiKeyAuthorization;
|
|||||||
e.PasswordAuthorization = PasswordAuthorization;
|
e.PasswordAuthorization = PasswordAuthorization;
|
||||||
e.CookieAuthorization = CookieAuthorization;
|
e.CookieAuthorization = CookieAuthorization;
|
||||||
e.SwaggerClient = SwaggerClient;
|
e.SwaggerClient = SwaggerClient;
|
||||||
|
e.SwaggerApi = SwaggerClient;
|
||||||
e.Operation = Operation;
|
e.Operation = Operation;
|
||||||
e.Model = Model;
|
e.Model = Model;
|
||||||
e.models = models;
|
e.addModel = addModel;
|
||||||
|
|
||||||
})();
|
})();
|
||||||
631
dist/swagger-ui.js
vendored
631
dist/swagger-ui.js
vendored
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* swagger-ui - Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API
|
* swagger-ui - Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API
|
||||||
* @version v2.1.2-M1
|
* @version v2.1.3-M1
|
||||||
* @link http://swagger.io
|
* @link http://swagger.io
|
||||||
* @license Apache 2.0
|
* @license Apache 2.0
|
||||||
*/
|
*/
|
||||||
@@ -199,14 +199,6 @@ var Docs = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
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(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return "<!--div class='auth_button' id='apikey_button'><img class='auth_icon' alt='apply api key' src='images/apikey.jpeg'></div-->\n<div class='auth_container' id='apikey_container'>\n <div class='key_input_container'>\n <div class='auth_label'>"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.keyName || (depth0 != null ? depth0.keyName : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"keyName","hash":{},"data":data}) : helper)))
|
|
||||||
+ "</div>\n <input placeholder=\"api_key\" class=\"auth_input\" id=\"input_apiKey_entry\" name=\"apiKey\" type=\"text\"/>\n <div class='auth_submit'><a class='auth_submit_button' id=\"apply_api_key\" href=\"#\">apply</a></div>\n </div>\n</div>\n\n";
|
|
||||||
},"useData":true});
|
|
||||||
var SwaggerUi,
|
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; },
|
__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;
|
__hasProp = {}.hasOwnProperty;
|
||||||
@@ -292,8 +284,7 @@ SwaggerUi = (function(_super) {
|
|||||||
}
|
}
|
||||||
this.options.url = url;
|
this.options.url = url;
|
||||||
this.headerView.update(url);
|
this.headerView.update(url);
|
||||||
this.api = new SwaggerClient(this.options);
|
return this.api = new SwaggerClient(this.options);
|
||||||
return this.api.build();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
SwaggerUi.prototype.collapseAll = function() {
|
SwaggerUi.prototype.collapseAll = function() {
|
||||||
@@ -331,7 +322,7 @@ SwaggerUi = (function(_super) {
|
|||||||
return function() {
|
return function() {
|
||||||
return Docs.shebang();
|
return Docs.shebang();
|
||||||
};
|
};
|
||||||
})(this), 400);
|
})(this), 4000);
|
||||||
};
|
};
|
||||||
|
|
||||||
SwaggerUi.prototype.buildUrl = function(base, url) {
|
SwaggerUi.prototype.buildUrl = function(base, url) {
|
||||||
@@ -394,6 +385,14 @@ SwaggerUi = (function(_super) {
|
|||||||
|
|
||||||
window.SwaggerUi = SwaggerUi;
|
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(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return "<!--div class='auth_button' id='apikey_button'><img class='auth_icon' alt='apply api key' src='images/apikey.jpeg'></div-->\n<div class='auth_container' id='apikey_container'>\n <div class='key_input_container'>\n <div class='auth_label'>"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.keyName || (depth0 != null ? depth0.keyName : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"keyName","hash":{},"data":data}) : helper)))
|
||||||
|
+ "</div>\n <input placeholder=\"api_key\" class=\"auth_input\" id=\"input_apiKey_entry\" name=\"apiKey\" type=\"text\"/>\n <div class='auth_submit'><a class='auth_submit_button' id=\"apply_api_key\" href=\"#\">apply</a></div>\n </div>\n</div>\n\n";
|
||||||
|
},"useData":true});
|
||||||
Handlebars.registerHelper('sanitize', function(html) {
|
Handlebars.registerHelper('sanitize', function(html) {
|
||||||
html = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
|
html = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
|
||||||
return new Handlebars.SafeString(html);
|
return new Handlebars.SafeString(html);
|
||||||
@@ -614,35 +613,6 @@ this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(dept
|
|||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
return buffer + " </h4>\n </div>\n</div>\n";
|
return buffer + " </h4>\n </div>\n</div>\n";
|
||||||
},"useData":true});
|
},"useData":true});
|
||||||
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;
|
|
||||||
|
|
||||||
ContentTypeView = (function(_super) {
|
|
||||||
__extends(ContentTypeView, _super);
|
|
||||||
|
|
||||||
function ContentTypeView() {
|
|
||||||
return ContentTypeView.__super__.constructor.apply(this, arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
ContentTypeView.prototype.initialize = function() {};
|
|
||||||
|
|
||||||
ContentTypeView.prototype.render = function() {
|
|
||||||
var template;
|
|
||||||
template = this.template();
|
|
||||||
$(this.el).html(template(this.model));
|
|
||||||
$('label[for=contentType]', $(this.el)).text('Response Content Type');
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
ContentTypeView.prototype.template = function() {
|
|
||||||
return Handlebars.templates.content_type;
|
|
||||||
};
|
|
||||||
|
|
||||||
return ContentTypeView;
|
|
||||||
|
|
||||||
})(Backbone.View);
|
|
||||||
|
|
||||||
this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||||
return "deprecated";
|
return "deprecated";
|
||||||
},"3":function(depth0,helpers,partials,data) {
|
},"3":function(depth0,helpers,partials,data) {
|
||||||
@@ -746,6 +716,98 @@ this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function
|
|||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
return buffer + " </form>\n <div class='response' style='display:none'>\n <h4>Request URL</h4>\n <div class='block request_url'></div>\n <h4>Response Body</h4>\n <div class='block response_body'></div>\n <h4>Response Code</h4>\n <div class='block response_code'></div>\n <h4>Response Headers</h4>\n <div class='block response_headers'></div>\n </div>\n </div>\n </li>\n </ul>\n";
|
return buffer + " </form>\n <div class='response' style='display:none'>\n <h4>Request URL</h4>\n <div class='block request_url'></div>\n <h4>Response Body</h4>\n <div class='block response_body'></div>\n <h4>Response Code</h4>\n <div class='block response_code'></div>\n <h4>Response Headers</h4>\n <div class='block response_headers'></div>\n </div>\n </div>\n </li>\n </ul>\n";
|
||||||
},"useData":true});
|
},"useData":true});
|
||||||
|
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;
|
||||||
|
|
||||||
|
ContentTypeView = (function(_super) {
|
||||||
|
__extends(ContentTypeView, _super);
|
||||||
|
|
||||||
|
function ContentTypeView() {
|
||||||
|
return ContentTypeView.__super__.constructor.apply(this, arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
ContentTypeView.prototype.initialize = function() {};
|
||||||
|
|
||||||
|
ContentTypeView.prototype.render = function() {
|
||||||
|
var template;
|
||||||
|
template = this.template();
|
||||||
|
$(this.el).html(template(this.model));
|
||||||
|
$('label[for=contentType]', $(this.el)).text('Response Content Type');
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
|
||||||
|
ContentTypeView.prototype.template = function() {
|
||||||
|
return Handlebars.templates.content_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
return ContentTypeView;
|
||||||
|
|
||||||
|
})(Backbone.View);
|
||||||
|
|
||||||
|
this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, buffer = "";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"2":function(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return " <input type=\"file\" name='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
|
+ "'/>\n <div class=\"parameter-content-type\" />\n";
|
||||||
|
},"4":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, buffer = "";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"5":function(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return " <textarea class='body-textarea' name='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
|
+ "'>"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
||||||
|
+ "</textarea>\n <br />\n <div class=\"parameter-content-type\" />\n";
|
||||||
|
},"7":function(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return " <textarea class='body-textarea' name='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
|
+ "'></textarea>\n <br />\n <div class=\"parameter-content-type\" />\n";
|
||||||
|
},"9":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, buffer = "";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(10, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"10":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, buffer = "";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(11, data),"inverse":this.program(13, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"11":function(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return " <input class='parameter' minlength='0' name='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
|
+ "' placeholder='' type='text' value='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
||||||
|
+ "'/>\n";
|
||||||
|
},"13":function(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return " <input class='parameter' minlength='0' name='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
|
+ "' placeholder='' type='text' value=''/>\n";
|
||||||
|
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code'>"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
|
+ "</td>\n<td>\n\n";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
buffer += "\n</td>\n<td class=\"markdown\">";
|
||||||
|
stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
buffer += "</td>\n<td>";
|
||||||
|
stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer + "</td>\n<td>\n <span class=\"model-signature\"></span>\n</td>\n";
|
||||||
|
},"useData":true});
|
||||||
var HeaderView,
|
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; },
|
__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;
|
__hasProp = {}.hasOwnProperty;
|
||||||
@@ -811,6 +873,62 @@ HeaderView = (function(_super) {
|
|||||||
|
|
||||||
})(Backbone.View);
|
})(Backbone.View);
|
||||||
|
|
||||||
|
this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||||
|
return " multiple='multiple'";
|
||||||
|
},"3":function(depth0,helpers,partials,data) {
|
||||||
|
return "";
|
||||||
|
},"5":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, buffer = "";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(6, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"6":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, helperMissing=helpers.helperMissing, buffer = "";
|
||||||
|
stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(3, data),"inverse":this.program(7, data),"data":data}));
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"7":function(depth0,helpers,partials,data) {
|
||||||
|
return " <option selected=\"\" value=''></option>\n";
|
||||||
|
},"9":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, buffer = "";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isDefault : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"10":function(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return " <option selected=\"\" value='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
||||||
|
+ "'>"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
||||||
|
+ " (default)</option>\n";
|
||||||
|
},"12":function(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return " <option value='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
||||||
|
+ "'>"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
||||||
|
+ "</option>\n";
|
||||||
|
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code'>"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
|
+ "</td>\n<td>\n <select ";
|
||||||
|
stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}));
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
buffer += " class='parameter' name='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
|
+ "'>\n";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(5, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
stack1 = helpers.each.call(depth0, ((stack1 = (depth0 != null ? depth0.allowableValues : depth0)) != null ? stack1.descriptiveValues : stack1), {"name":"each","hash":{},"fn":this.program(9, data),"inverse":this.noop,"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
buffer += " </select>\n</td>\n<td class=\"markdown\">";
|
||||||
|
stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
buffer += "</td>\n<td>";
|
||||||
|
stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>";
|
||||||
|
},"useData":true});
|
||||||
var MainView,
|
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; },
|
__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;
|
__hasProp = {}.hasOwnProperty;
|
||||||
@@ -924,68 +1042,38 @@ MainView = (function(_super) {
|
|||||||
|
|
||||||
})(Backbone.View);
|
})(Backbone.View);
|
||||||
|
|
||||||
this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
this["Handlebars"]["templates"]["param_readonly"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||||
var stack1, buffer = "";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer;
|
|
||||||
},"2":function(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
return " <input type=\"file\" name='"
|
return " <textarea class='body-textarea' readonly='readonly' name='"
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'/>\n <div class=\"parameter-content-type\" />\n";
|
|
||||||
},"4":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, buffer = "";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer;
|
|
||||||
},"5":function(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return " <textarea class='body-textarea' name='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
+ "'>"
|
+ "'>"
|
||||||
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
||||||
+ "</textarea>\n <br />\n <div class=\"parameter-content-type\" />\n";
|
+ "</textarea>\n";
|
||||||
},"7":function(depth0,helpers,partials,data) {
|
},"3":function(depth0,helpers,partials,data) {
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return " <textarea class='body-textarea' name='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'></textarea>\n <br />\n <div class=\"parameter-content-type\" />\n";
|
|
||||||
},"9":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, buffer = "";
|
var stack1, buffer = "";
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(10, data),"data":data});
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data});
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
return buffer;
|
return buffer;
|
||||||
},"10":function(depth0,helpers,partials,data) {
|
},"4":function(depth0,helpers,partials,data) {
|
||||||
var stack1, buffer = "";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(11, data),"inverse":this.program(13, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer;
|
|
||||||
},"11":function(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
return " <input class='parameter' minlength='0' name='"
|
return " "
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
|
||||||
+ "' placeholder='' type='text' value='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
||||||
+ "'/>\n";
|
+ "\n";
|
||||||
},"13":function(depth0,helpers,partials,data) {
|
},"6":function(depth0,helpers,partials,data) {
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
return " (empty)\n";
|
||||||
return " <input class='parameter' minlength='0' name='"
|
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
|
||||||
+ "' placeholder='' type='text' value=''/>\n";
|
|
||||||
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code'>"
|
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code'>"
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
+ "</td>\n<td>\n\n";
|
+ "</td>\n<td>\n";
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data});
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
buffer += "\n</td>\n<td class=\"markdown\">";
|
buffer += "</td>\n<td class=\"markdown\">";
|
||||||
stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
|
stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
buffer += "</td>\n<td>";
|
buffer += "</td>\n<td>";
|
||||||
stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
|
stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
return buffer + "</td>\n<td>\n <span class=\"model-signature\"></span>\n</td>\n";
|
return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
||||||
},"useData":true});
|
},"useData":true});
|
||||||
var OperationView,
|
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; },
|
__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; },
|
||||||
@@ -1600,61 +1688,38 @@ OperationView = (function(_super) {
|
|||||||
|
|
||||||
})(Backbone.View);
|
})(Backbone.View);
|
||||||
|
|
||||||
this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
this["Handlebars"]["templates"]["param_readonly_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||||
return " multiple='multiple'";
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
},"3":function(depth0,helpers,partials,data) {
|
return " <textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='"
|
||||||
return "";
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
},"5":function(depth0,helpers,partials,data) {
|
+ "'>"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
||||||
|
+ "</textarea>\n";
|
||||||
|
},"3":function(depth0,helpers,partials,data) {
|
||||||
var stack1, buffer = "";
|
var stack1, buffer = "";
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(6, data),"data":data});
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data});
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
return buffer;
|
return buffer;
|
||||||
|
},"4":function(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return " "
|
||||||
|
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
||||||
|
+ "\n";
|
||||||
},"6":function(depth0,helpers,partials,data) {
|
},"6":function(depth0,helpers,partials,data) {
|
||||||
var stack1, helperMissing=helpers.helperMissing, buffer = "";
|
return " (empty)\n";
|
||||||
stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(3, data),"inverse":this.program(7, data),"data":data}));
|
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||||
if (stack1 != null) { buffer += stack1; }
|
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code required'>"
|
||||||
return buffer;
|
|
||||||
},"7":function(depth0,helpers,partials,data) {
|
|
||||||
return " <option selected=\"\" value=''></option>\n";
|
|
||||||
},"9":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, buffer = "";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isDefault : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer;
|
|
||||||
},"10":function(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return " <option selected=\"\" value='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'>"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
|
||||||
+ " (default)</option>\n";
|
|
||||||
},"12":function(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return " <option value='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'>"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
|
|
||||||
+ "</option>\n";
|
|
||||||
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code'>"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
+ "</td>\n<td>\n <select ";
|
+ "</td>\n<td>\n";
|
||||||
stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}));
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
buffer += " class='parameter' name='"
|
buffer += "</td>\n<td class=\"markdown\">";
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'>\n";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(5, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
stack1 = helpers.each.call(depth0, ((stack1 = (depth0 != null ? depth0.allowableValues : depth0)) != null ? stack1.descriptiveValues : stack1), {"name":"each","hash":{},"fn":this.program(9, data),"inverse":this.noop,"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
buffer += " </select>\n</td>\n<td class=\"markdown\">";
|
|
||||||
stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
|
stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
buffer += "</td>\n<td>";
|
buffer += "</td>\n<td>";
|
||||||
stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
|
stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>";
|
return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
||||||
},"useData":true});
|
},"useData":true});
|
||||||
var ParameterContentTypeView,
|
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; },
|
__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; },
|
||||||
@@ -1685,35 +1750,70 @@ ParameterContentTypeView = (function(_super) {
|
|||||||
|
|
||||||
})(Backbone.View);
|
})(Backbone.View);
|
||||||
|
|
||||||
this["Handlebars"]["templates"]["param_readonly"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
this["Handlebars"]["templates"]["param_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, buffer = "";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"2":function(depth0,helpers,partials,data) {
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
return " <textarea class='body-textarea' readonly='readonly' name='"
|
return " <input type=\"file\" name='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
|
+ "'/>\n";
|
||||||
|
},"4":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, buffer = "";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"5":function(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return " <textarea class='body-textarea required' placeholder='(required)' name='"
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
+ "'>"
|
+ "'>"
|
||||||
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
||||||
+ "</textarea>\n";
|
+ "</textarea>\n <br />\n <div class=\"parameter-content-type\" />\n";
|
||||||
},"3":function(depth0,helpers,partials,data) {
|
},"7":function(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return " <textarea class='body-textarea required' placeholder='(required)' name='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
|
+ "'></textarea>\n <br />\n <div class=\"parameter-content-type\" />\n";
|
||||||
|
},"9":function(depth0,helpers,partials,data) {
|
||||||
var stack1, buffer = "";
|
var stack1, buffer = "";
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data});
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data});
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
return buffer;
|
return buffer;
|
||||||
},"4":function(depth0,helpers,partials,data) {
|
},"10":function(depth0,helpers,partials,data) {
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
return " "
|
return " <input class='parameter' class='required' type='file' name='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
|
+ "'/>\n";
|
||||||
|
},"12":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, buffer = "";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(13, data),"inverse":this.program(15, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"13":function(depth0,helpers,partials,data) {
|
||||||
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
|
return " <input class='parameter required' minlength='1' name='"
|
||||||
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
|
+ "' placeholder='(required)' type='text' value='"
|
||||||
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
||||||
+ "\n";
|
+ "'/>\n";
|
||||||
},"6":function(depth0,helpers,partials,data) {
|
},"15":function(depth0,helpers,partials,data) {
|
||||||
return " (empty)\n";
|
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
||||||
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
return " <input class='parameter required' minlength='1' name='"
|
||||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code'>"
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
|
+ "' placeholder='(required)' type='text' value=''/>\n";
|
||||||
|
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code required'>"
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
||||||
+ "</td>\n<td>\n";
|
+ "</td>\n<td>\n";
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data});
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
buffer += "</td>\n<td class=\"markdown\">";
|
buffer += "</td>\n<td>\n <strong><span class=\"markdown\">";
|
||||||
stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
|
stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
buffer += "</td>\n<td>";
|
buffer += "</span></strong>\n</td>\n<td>";
|
||||||
stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
|
stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
||||||
@@ -1827,38 +1927,26 @@ ParameterView = (function(_super) {
|
|||||||
|
|
||||||
})(Backbone.View);
|
})(Backbone.View);
|
||||||
|
|
||||||
this["Handlebars"]["templates"]["param_readonly_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
this["Handlebars"]["templates"]["parameter_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return " <textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'>"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
|
||||||
+ "</textarea>\n";
|
|
||||||
},"3":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, buffer = "";
|
var stack1, buffer = "";
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data});
|
stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.consumes : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
return buffer;
|
return buffer;
|
||||||
|
},"2":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, lambda=this.lambda, buffer = " <option value=\"";
|
||||||
|
stack1 = lambda(depth0, depth0);
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
buffer += "\">";
|
||||||
|
stack1 = lambda(depth0, depth0);
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer + "</option>\n";
|
||||||
},"4":function(depth0,helpers,partials,data) {
|
},"4":function(depth0,helpers,partials,data) {
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
return " <option value=\"application/json\">application/json</option>\n";
|
||||||
return " "
|
|
||||||
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
|
||||||
+ "\n";
|
|
||||||
},"6":function(depth0,helpers,partials,data) {
|
|
||||||
return " (empty)\n";
|
|
||||||
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code required'>"
|
var stack1, buffer = "<label for=\"parameterContentType\"></label>\n<select name=\"parameterContentType\">\n";
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.consumes : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data});
|
||||||
+ "</td>\n<td>\n";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
buffer += "</td>\n<td class=\"markdown\">";
|
return buffer + "</select>\n";
|
||||||
stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
buffer += "</td>\n<td>";
|
|
||||||
stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
|
||||||
},"useData":true});
|
},"useData":true});
|
||||||
var ResourceView,
|
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; },
|
__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; },
|
||||||
@@ -1931,124 +2019,6 @@ ResourceView = (function(_super) {
|
|||||||
|
|
||||||
})(Backbone.View);
|
})(Backbone.View);
|
||||||
|
|
||||||
this["Handlebars"]["templates"]["param_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, buffer = "";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer;
|
|
||||||
},"2":function(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return " <input type=\"file\" name='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'/>\n";
|
|
||||||
},"4":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, buffer = "";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer;
|
|
||||||
},"5":function(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return " <textarea class='body-textarea required' placeholder='(required)' name='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'>"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
|
||||||
+ "</textarea>\n <br />\n <div class=\"parameter-content-type\" />\n";
|
|
||||||
},"7":function(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return " <textarea class='body-textarea required' placeholder='(required)' name='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'></textarea>\n <br />\n <div class=\"parameter-content-type\" />\n";
|
|
||||||
},"9":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, buffer = "";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer;
|
|
||||||
},"10":function(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return " <input class='parameter' class='required' type='file' name='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'/>\n";
|
|
||||||
},"12":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, buffer = "";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(13, data),"inverse":this.program(15, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer;
|
|
||||||
},"13":function(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return " <input class='parameter required' minlength='1' name='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
|
||||||
+ "' placeholder='(required)' type='text' value='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
|
|
||||||
+ "'/>\n";
|
|
||||||
},"15":function(depth0,helpers,partials,data) {
|
|
||||||
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
|
|
||||||
return " <input class='parameter required' minlength='1' name='"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
|
||||||
+ "' placeholder='(required)' type='text' value=''/>\n";
|
|
||||||
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code required'>"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
|
|
||||||
+ "</td>\n<td>\n";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
buffer += "</td>\n<td>\n <strong><span class=\"markdown\">";
|
|
||||||
stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
buffer += "</span></strong>\n</td>\n<td>";
|
|
||||||
stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n";
|
|
||||||
},"useData":true});
|
|
||||||
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;
|
|
||||||
|
|
||||||
ResponseContentTypeView = (function(_super) {
|
|
||||||
__extends(ResponseContentTypeView, _super);
|
|
||||||
|
|
||||||
function ResponseContentTypeView() {
|
|
||||||
return ResponseContentTypeView.__super__.constructor.apply(this, arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
ResponseContentTypeView.prototype.initialize = function() {};
|
|
||||||
|
|
||||||
ResponseContentTypeView.prototype.render = function() {
|
|
||||||
var template;
|
|
||||||
template = this.template();
|
|
||||||
$(this.el).html(template(this.model));
|
|
||||||
$('label[for=responseContentType]', $(this.el)).text('Response Content Type');
|
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
ResponseContentTypeView.prototype.template = function() {
|
|
||||||
return Handlebars.templates.response_content_type;
|
|
||||||
};
|
|
||||||
|
|
||||||
return ResponseContentTypeView;
|
|
||||||
|
|
||||||
})(Backbone.View);
|
|
||||||
|
|
||||||
this["Handlebars"]["templates"]["parameter_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, buffer = "";
|
|
||||||
stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.consumes : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer;
|
|
||||||
},"2":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, lambda=this.lambda, buffer = " <option value=\"";
|
|
||||||
stack1 = lambda(depth0, depth0);
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
buffer += "\">";
|
|
||||||
stack1 = lambda(depth0, depth0);
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer + "</option>\n";
|
|
||||||
},"4":function(depth0,helpers,partials,data) {
|
|
||||||
return " <option value=\"application/json\">application/json</option>\n";
|
|
||||||
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, buffer = "<label for=\"parameterContentType\"></label>\n<select name=\"parameterContentType\">\n";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.consumes : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer + "</select>\n";
|
|
||||||
},"useData":true});
|
|
||||||
this["Handlebars"]["templates"]["resource"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
this["Handlebars"]["templates"]["resource"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||||
return " : ";
|
return " : ";
|
||||||
},"3":function(depth0,helpers,partials,data) {
|
},"3":function(depth0,helpers,partials,data) {
|
||||||
@@ -2087,6 +2057,56 @@ this["Handlebars"]["templates"]["resource"] = Handlebars.template({"1":function(
|
|||||||
+ escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
|
+ escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
|
||||||
+ "_endpoint_list' style='display:none'>\n\n</ul>\n";
|
+ "_endpoint_list' style='display:none'>\n\n</ul>\n";
|
||||||
},"useData":true});
|
},"useData":true});
|
||||||
|
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;
|
||||||
|
|
||||||
|
ResponseContentTypeView = (function(_super) {
|
||||||
|
__extends(ResponseContentTypeView, _super);
|
||||||
|
|
||||||
|
function ResponseContentTypeView() {
|
||||||
|
return ResponseContentTypeView.__super__.constructor.apply(this, arguments);
|
||||||
|
}
|
||||||
|
|
||||||
|
ResponseContentTypeView.prototype.initialize = function() {};
|
||||||
|
|
||||||
|
ResponseContentTypeView.prototype.render = function() {
|
||||||
|
var template;
|
||||||
|
template = this.template();
|
||||||
|
$(this.el).html(template(this.model));
|
||||||
|
$('label[for=responseContentType]', $(this.el)).text('Response Content Type');
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
|
||||||
|
ResponseContentTypeView.prototype.template = function() {
|
||||||
|
return Handlebars.templates.response_content_type;
|
||||||
|
};
|
||||||
|
|
||||||
|
return ResponseContentTypeView;
|
||||||
|
|
||||||
|
})(Backbone.View);
|
||||||
|
|
||||||
|
this["Handlebars"]["templates"]["response_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, buffer = "";
|
||||||
|
stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer;
|
||||||
|
},"2":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, lambda=this.lambda, buffer = " <option value=\"";
|
||||||
|
stack1 = lambda(depth0, depth0);
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
buffer += "\">";
|
||||||
|
stack1 = lambda(depth0, depth0);
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer + "</option>\n";
|
||||||
|
},"4":function(depth0,helpers,partials,data) {
|
||||||
|
return " <option value=\"application/json\">application/json</option>\n";
|
||||||
|
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||||
|
var stack1, buffer = "<label for=\"responseContentType\"></label>\n<select name=\"responseContentType\">\n";
|
||||||
|
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data});
|
||||||
|
if (stack1 != null) { buffer += stack1; }
|
||||||
|
return buffer + "</select>\n";
|
||||||
|
},"useData":true});
|
||||||
var SignatureView,
|
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; },
|
__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;
|
__hasProp = {}.hasOwnProperty;
|
||||||
@@ -2159,26 +2179,13 @@ SignatureView = (function(_super) {
|
|||||||
|
|
||||||
})(Backbone.View);
|
})(Backbone.View);
|
||||||
|
|
||||||
this["Handlebars"]["templates"]["response_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
|
this["Handlebars"]["templates"]["signature"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||||
var stack1, buffer = "";
|
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div>\n<ul class=\"signature-nav\">\n <li><a class=\"description-link\" href=\"#\">Model</a></li>\n <li><a class=\"snippet-link\" href=\"#\">Model Schema</a></li>\n</ul>\n<div>\n\n<div class=\"signature-container\">\n <div class=\"description\">\n ";
|
||||||
stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
|
stack1 = ((helper = (helper = helpers.signature || (depth0 != null ? depth0.signature : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signature","hash":{},"data":data}) : helper));
|
||||||
if (stack1 != null) { buffer += stack1; }
|
if (stack1 != null) { buffer += stack1; }
|
||||||
return buffer;
|
return buffer + "\n </div>\n\n <div class=\"snippet\">\n <pre><code>"
|
||||||
},"2":function(depth0,helpers,partials,data) {
|
+ escapeExpression(((helper = (helper = helpers.sampleJSON || (depth0 != null ? depth0.sampleJSON : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"sampleJSON","hash":{},"data":data}) : helper)))
|
||||||
var stack1, lambda=this.lambda, buffer = " <option value=\"";
|
+ "</code></pre>\n <small class=\"notice\"></small>\n </div>\n</div>\n\n";
|
||||||
stack1 = lambda(depth0, depth0);
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
buffer += "\">";
|
|
||||||
stack1 = lambda(depth0, depth0);
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer + "</option>\n";
|
|
||||||
},"4":function(depth0,helpers,partials,data) {
|
|
||||||
return " <option value=\"application/json\">application/json</option>\n";
|
|
||||||
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, buffer = "<label for=\"responseContentType\"></label>\n<select name=\"responseContentType\">\n";
|
|
||||||
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data});
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer + "</select>\n";
|
|
||||||
},"useData":true});
|
},"useData":true});
|
||||||
var StatusCodeView,
|
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; },
|
__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; },
|
||||||
@@ -2222,14 +2229,6 @@ StatusCodeView = (function(_super) {
|
|||||||
|
|
||||||
})(Backbone.View);
|
})(Backbone.View);
|
||||||
|
|
||||||
this["Handlebars"]["templates"]["signature"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
|
||||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div>\n<ul class=\"signature-nav\">\n <li><a class=\"description-link\" href=\"#\">Model</a></li>\n <li><a class=\"snippet-link\" href=\"#\">Model Schema</a></li>\n</ul>\n<div>\n\n<div class=\"signature-container\">\n <div class=\"description\">\n ";
|
|
||||||
stack1 = ((helper = (helper = helpers.signature || (depth0 != null ? depth0.signature : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signature","hash":{},"data":data}) : helper));
|
|
||||||
if (stack1 != null) { buffer += stack1; }
|
|
||||||
return buffer + "\n </div>\n\n <div class=\"snippet\">\n <pre><code>"
|
|
||||||
+ escapeExpression(((helper = (helper = helpers.sampleJSON || (depth0 != null ? depth0.sampleJSON : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"sampleJSON","hash":{},"data":data}) : helper)))
|
|
||||||
+ "</code></pre>\n <small class=\"notice\"></small>\n </div>\n</div>\n\n";
|
|
||||||
},"useData":true});
|
|
||||||
this["Handlebars"]["templates"]["status_code"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
this["Handlebars"]["templates"]["status_code"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
|
||||||
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td width='15%' class='code'>"
|
var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td width='15%' class='code'>"
|
||||||
+ escapeExpression(((helper = (helper = helpers.code || (depth0 != null ? depth0.code : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"code","hash":{},"data":data}) : helper)))
|
+ escapeExpression(((helper = (helper = helpers.code || (depth0 != null ? depth0.code : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"code","hash":{},"data":data}) : helper)))
|
||||||
|
|||||||
4
dist/swagger-ui.min.js
vendored
4
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* swagger-client - swagger.js is a javascript client for use with swaggering APIs.
|
* swagger-client - swagger.js is a javascript client for use with swaggering APIs.
|
||||||
* @version v2.1.2-M1
|
* @version v2.1.3-M1
|
||||||
* @link http://swagger.io
|
* @link http://swagger.io
|
||||||
* @license apache 2.0
|
* @license apache 2.0
|
||||||
*/
|
*/
|
||||||
@@ -82,10 +82,10 @@ SwaggerAuthorizations.prototype.remove = function(name) {
|
|||||||
|
|
||||||
SwaggerAuthorizations.prototype.apply = function (obj, authorizations) {
|
SwaggerAuthorizations.prototype.apply = function (obj, authorizations) {
|
||||||
var status = null;
|
var status = null;
|
||||||
var key, value, result;
|
var key, name, value, result;
|
||||||
|
|
||||||
// if the "authorizations" key is undefined, or has an empty array, add all keys
|
// if the "authorizations" key is undefined, or has an empty array, add all keys
|
||||||
if (typeof authorizations === 'undefined' || Object.keys(authorizations).length == 0) {
|
if (typeof authorizations === 'undefined' || Object.keys(authorizations).length === 0) {
|
||||||
for (key in this.authz) {
|
for (key in this.authz) {
|
||||||
value = this.authz[key];
|
value = this.authz[key];
|
||||||
result = value.apply(obj, authorizations);
|
result = value.apply(obj, authorizations);
|
||||||
@@ -280,6 +280,10 @@ PrimitiveModel.prototype.getMockSignature = function(modelsToIgnore) {
|
|||||||
}
|
}
|
||||||
return returnVal;
|
return returnVal;
|
||||||
};
|
};
|
||||||
|
var addModel = function(name, model) {
|
||||||
|
models[name] = model;
|
||||||
|
};
|
||||||
|
|
||||||
var SwaggerClient = function(url, options) {
|
var SwaggerClient = function(url, options) {
|
||||||
this.isBuilt = false;
|
this.isBuilt = false;
|
||||||
this.url = null;
|
this.url = null;
|
||||||
@@ -291,13 +295,14 @@ var SwaggerClient = function(url, options) {
|
|||||||
this.isValid = false;
|
this.isValid = false;
|
||||||
this.info = null;
|
this.info = null;
|
||||||
this.useJQuery = false;
|
this.useJQuery = false;
|
||||||
|
this.resourceCount = 0;
|
||||||
|
|
||||||
if(typeof url !== 'undefined')
|
if(typeof url !== 'undefined')
|
||||||
return this.initialize(url, options);
|
return this.initialize(url, options);
|
||||||
};
|
};
|
||||||
|
|
||||||
SwaggerClient.prototype.initialize = function (url, options) {
|
SwaggerClient.prototype.initialize = function (url, options) {
|
||||||
this.models = models;
|
this.models = models = {};
|
||||||
|
|
||||||
options = (options||{});
|
options = (options||{});
|
||||||
|
|
||||||
@@ -386,7 +391,6 @@ SwaggerClient.prototype.build = function(mock) {
|
|||||||
return obj;
|
return obj;
|
||||||
new SwaggerHttp().execute(obj);
|
new SwaggerHttp().execute(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -502,8 +506,11 @@ SwaggerClient.prototype.buildFromSpec = function(response) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.isBuilt = true;
|
this.isBuilt = true;
|
||||||
if (this.success)
|
if (this.success) {
|
||||||
|
this.isValid = true;
|
||||||
|
this.isBuilt = true;
|
||||||
this.success();
|
this.success();
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -592,18 +599,18 @@ var Operation = function(parent, scheme, operationId, httpMethod, path, args, de
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var i, model;
|
||||||
|
|
||||||
if(definitions) {
|
if(definitions) {
|
||||||
// add to global models
|
// add to global models
|
||||||
var key;
|
var key;
|
||||||
for(key in this.definitions) {
|
for(key in this.definitions) {
|
||||||
var model = new Model(key, definitions[key]);
|
model = new Model(key, definitions[key]);
|
||||||
if(model) {
|
if(model) {
|
||||||
models[key] = model;
|
models[key] = model;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var i;
|
|
||||||
for(i = 0; i < this.parameters.length; i++) {
|
for(i = 0; i < this.parameters.length; i++) {
|
||||||
var param = this.parameters[i];
|
var param = this.parameters[i];
|
||||||
if(param.type === 'array') {
|
if(param.type === 'array') {
|
||||||
@@ -641,7 +648,7 @@ var Operation = function(parent, scheme, operationId, httpMethod, path, args, de
|
|||||||
param.responseClassSignature = param.signature;
|
param.responseClassSignature = param.signature;
|
||||||
}
|
}
|
||||||
|
|
||||||
var defaultResponseCode, response, model, responses = this.responses;
|
var defaultResponseCode, response, responses = this.responses;
|
||||||
|
|
||||||
if(responses['200']) {
|
if(responses['200']) {
|
||||||
response = responses['200'];
|
response = responses['200'];
|
||||||
@@ -995,9 +1002,9 @@ Operation.prototype.execute = function(arg1, arg2, arg3, arg4, parent) {
|
|||||||
var allHeaders = this.getHeaderParams(args);
|
var allHeaders = this.getHeaderParams(args);
|
||||||
var contentTypeHeaders = this.setContentTypes(args, opts);
|
var contentTypeHeaders = this.setContentTypes(args, opts);
|
||||||
|
|
||||||
var headers = {};
|
var headers = {}, attrname;
|
||||||
for (var attrname in allHeaders) { headers[attrname] = allHeaders[attrname]; }
|
for (attrname in allHeaders) { headers[attrname] = allHeaders[attrname]; }
|
||||||
for (var attrname in contentTypeHeaders) { headers[attrname] = contentTypeHeaders[attrname]; }
|
for (attrname in contentTypeHeaders) { headers[attrname] = contentTypeHeaders[attrname]; }
|
||||||
|
|
||||||
var body = this.getBody(headers, args);
|
var body = this.getBody(headers, args);
|
||||||
var url = this.urlify(args);
|
var url = this.urlify(args);
|
||||||
@@ -1439,7 +1446,7 @@ Property.prototype.toString = function() {
|
|||||||
type = '';
|
type = '';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.schema.type;
|
type = this.schema.type;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.default)
|
if (this.default)
|
||||||
@@ -1500,7 +1507,7 @@ Property.prototype.toString = function() {
|
|||||||
|
|
||||||
optionHtml = function(label, value) {
|
optionHtml = function(label, value) {
|
||||||
return '<tr><td class="optionName">' + label + ':</td><td>' + value + '</td></tr>';
|
return '<tr><td class="optionName">' + label + ':</td><td>' + value + '</td></tr>';
|
||||||
}
|
};
|
||||||
|
|
||||||
typeFromJsonSchema = function(type, format) {
|
typeFromJsonSchema = function(type, format) {
|
||||||
var str;
|
var str;
|
||||||
@@ -1533,7 +1540,7 @@ var cookies = {};
|
|||||||
var models = {};
|
var models = {};
|
||||||
|
|
||||||
SwaggerClient.prototype.buildFrom1_2Spec = function (response) {
|
SwaggerClient.prototype.buildFrom1_2Spec = function (response) {
|
||||||
if (response.apiVersion != null) {
|
if (response.apiVersion !== null) {
|
||||||
this.apiVersion = response.apiVersion;
|
this.apiVersion = response.apiVersion;
|
||||||
}
|
}
|
||||||
this.apis = {};
|
this.apis = {};
|
||||||
@@ -1569,6 +1576,7 @@ SwaggerClient.prototype.buildFrom1_2Spec = function (response) {
|
|||||||
this.apisArray.push(res);
|
this.apisArray.push(res);
|
||||||
} else {
|
} else {
|
||||||
var k;
|
var k;
|
||||||
|
this.expectedResourceCount = response.apis.length;
|
||||||
for (k = 0; k < response.apis.length; k++) {
|
for (k = 0; k < response.apis.length; k++) {
|
||||||
var resource = response.apis[k];
|
var resource = response.apis[k];
|
||||||
res = new SwaggerResource(resource, this);
|
res = new SwaggerResource(resource, this);
|
||||||
@@ -1577,15 +1585,21 @@ SwaggerClient.prototype.buildFrom1_2Spec = function (response) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.isValid = true;
|
this.isValid = true;
|
||||||
|
return this;
|
||||||
|
};
|
||||||
|
|
||||||
|
SwaggerClient.prototype.finish = function() {
|
||||||
if (typeof this.success === 'function') {
|
if (typeof this.success === 'function') {
|
||||||
|
this.isValid = true;
|
||||||
|
this.isBuilt = true;
|
||||||
|
this.selfReflect();
|
||||||
this.success();
|
this.success();
|
||||||
}
|
}
|
||||||
return this;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
SwaggerClient.prototype.buildFrom1_1Spec = function (response) {
|
SwaggerClient.prototype.buildFrom1_1Spec = function (response) {
|
||||||
log('This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info');
|
log('This API is using a deprecated version of Swagger! Please see http://github.com/wordnik/swagger-core/wiki for more info');
|
||||||
if (response.apiVersion != null)
|
if (response.apiVersion !== null)
|
||||||
this.apiVersion = response.apiVersion;
|
this.apiVersion = response.apiVersion;
|
||||||
this.apis = {};
|
this.apis = {};
|
||||||
this.apisArray = [];
|
this.apisArray = [];
|
||||||
@@ -1631,7 +1645,7 @@ SwaggerClient.prototype.buildFrom1_1Spec = function (response) {
|
|||||||
|
|
||||||
SwaggerClient.prototype.convertInfo = function (resp) {
|
SwaggerClient.prototype.convertInfo = function (resp) {
|
||||||
if(typeof resp == 'object') {
|
if(typeof resp == 'object') {
|
||||||
var info = {}
|
var info = {};
|
||||||
|
|
||||||
info.title = resp.title;
|
info.title = resp.title;
|
||||||
info.description = resp.description;
|
info.description = resp.description;
|
||||||
@@ -1660,9 +1674,6 @@ SwaggerClient.prototype.selfReflect = function () {
|
|||||||
}
|
}
|
||||||
this.setConsolidatedModels();
|
this.setConsolidatedModels();
|
||||||
this.ready = true;
|
this.ready = true;
|
||||||
if (typeof this.success === 'function') {
|
|
||||||
return this.success();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
SwaggerClient.prototype.setConsolidatedModels = function () {
|
SwaggerClient.prototype.setConsolidatedModels = function () {
|
||||||
@@ -1702,7 +1713,7 @@ var SwaggerResource = function (resourceObj, api) {
|
|||||||
this.operations = {};
|
this.operations = {};
|
||||||
this.operationsArray = [];
|
this.operationsArray = [];
|
||||||
this.modelsArray = [];
|
this.modelsArray = [];
|
||||||
this.models = {};
|
this.models = api.models || {};
|
||||||
this.rawModels = {};
|
this.rawModels = {};
|
||||||
this.useJQuery = (typeof api.useJQuery !== 'undefined') ? api.useJQuery : null;
|
this.useJQuery = (typeof api.useJQuery !== 'undefined') ? api.useJQuery : null;
|
||||||
|
|
||||||
@@ -1728,9 +1739,11 @@ var SwaggerResource = function (resourceObj, api) {
|
|||||||
on: {
|
on: {
|
||||||
response: function (resp) {
|
response: function (resp) {
|
||||||
var responseObj = resp.obj || JSON.parse(resp.data);
|
var responseObj = resp.obj || JSON.parse(resp.data);
|
||||||
|
_this.api.resourceCount += 1;
|
||||||
return _this.addApiDeclaration(responseObj);
|
return _this.addApiDeclaration(responseObj);
|
||||||
},
|
},
|
||||||
error: function (response) {
|
error: function (response) {
|
||||||
|
_this.api.resourceCount += 1;
|
||||||
return _this.api.fail('Unable to read api \'' +
|
return _this.api.fail('Unable to read api \'' +
|
||||||
_this.name + '\' from path ' + _this.url + ' (server returned ' + response.statusText + ')');
|
_this.name + '\' from path ' + _this.url + ' (server returned ' + response.statusText + ')');
|
||||||
}
|
}
|
||||||
@@ -1784,7 +1797,9 @@ SwaggerResource.prototype.addApiDeclaration = function (response) {
|
|||||||
}
|
}
|
||||||
this.api[this.name] = this;
|
this.api[this.name] = this;
|
||||||
this.ready = true;
|
this.ready = true;
|
||||||
return this.api.selfReflect();
|
if(this.api.resourceCount === this.api.expectedResourceCount)
|
||||||
|
this.api.finish();
|
||||||
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
SwaggerResource.prototype.addModels = function (models) {
|
SwaggerResource.prototype.addModels = function (models) {
|
||||||
@@ -2077,7 +2092,7 @@ var SwaggerOperation = function (nickname, path, method, parameters, summary, no
|
|||||||
|
|
||||||
this.path = this.path.replace('{format}', 'json');
|
this.path = this.path.replace('{format}', 'json');
|
||||||
this.method = this.method.toLowerCase();
|
this.method = this.method.toLowerCase();
|
||||||
this.isGetMethod = this.method === 'GET';
|
this.isGetMethod = this.method === 'get';
|
||||||
|
|
||||||
var i, j, v;
|
var i, j, v;
|
||||||
this.resourceName = this.resource.name;
|
this.resourceName = this.resource.name;
|
||||||
@@ -2128,17 +2143,17 @@ var SwaggerOperation = function (nickname, path, method, parameters, summary, no
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (param.allowableValues != null) {
|
else if (param.allowableValues) {
|
||||||
if (param.allowableValues.valueType === 'RANGE')
|
if (param.allowableValues.valueType === 'RANGE')
|
||||||
param.isRange = true;
|
param.isRange = true;
|
||||||
else
|
else
|
||||||
param.isList = true;
|
param.isList = true;
|
||||||
if (param.allowableValues != null) {
|
if (param.allowableValues) {
|
||||||
param.allowableValues.descriptiveValues = [];
|
param.allowableValues.descriptiveValues = [];
|
||||||
if (param.allowableValues.values) {
|
if (param.allowableValues.values) {
|
||||||
for (j = 0; j < param.allowableValues.values.length; j++) {
|
for (j = 0; j < param.allowableValues.values.length; j++) {
|
||||||
v = param.allowableValues.values[j];
|
v = param.allowableValues.values[j];
|
||||||
if (param.defaultValue != null) {
|
if (param.defaultValue !== null) {
|
||||||
param.allowableValues.descriptiveValues.push({
|
param.allowableValues.descriptiveValues.push({
|
||||||
value: String(v),
|
value: String(v),
|
||||||
isDefault: (v === param.defaultValue)
|
isDefault: (v === param.defaultValue)
|
||||||
@@ -2208,7 +2223,7 @@ SwaggerOperation.prototype.getSampleJSON = function (type, models) {
|
|||||||
var isPrimitive, listType, val;
|
var isPrimitive, listType, val;
|
||||||
listType = this.isListType(type);
|
listType = this.isListType(type);
|
||||||
isPrimitive = ((typeof listType !== 'undefined') && models[listType]) || (typeof models[type] !== 'undefined') ? false : true;
|
isPrimitive = ((typeof listType !== 'undefined') && models[listType]) || (typeof models[type] !== 'undefined') ? false : true;
|
||||||
val = isPrimitive ? void 0 : (listType != null ? models[listType].createJSONSample() : models[type].createJSONSample());
|
val = isPrimitive ? void 0 : (listType ? models[listType].createJSONSample() : models[type].createJSONSample());
|
||||||
if (val) {
|
if (val) {
|
||||||
val = listType ? [val] : val;
|
val = listType ? [val] : val;
|
||||||
if (typeof val == 'string')
|
if (typeof val == 'string')
|
||||||
@@ -2243,7 +2258,7 @@ SwaggerOperation.prototype['do'] = function (args, opts, callback, error) {
|
|||||||
callback = function (response) {
|
callback = function (response) {
|
||||||
var content;
|
var content;
|
||||||
content = null;
|
content = null;
|
||||||
if (response != null) {
|
if (response !== null) {
|
||||||
content = response.data;
|
content = response.data;
|
||||||
} else {
|
} else {
|
||||||
content = 'no data';
|
content = 'no data';
|
||||||
@@ -2254,7 +2269,7 @@ SwaggerOperation.prototype['do'] = function (args, opts, callback, error) {
|
|||||||
|
|
||||||
params = {};
|
params = {};
|
||||||
params.headers = [];
|
params.headers = [];
|
||||||
if (args.headers != null) {
|
if (args.headers) {
|
||||||
params.headers = args.headers;
|
params.headers = args.headers;
|
||||||
delete args.headers;
|
delete args.headers;
|
||||||
}
|
}
|
||||||
@@ -2375,7 +2390,7 @@ SwaggerOperation.prototype.urlify = function (args) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((queryParams != null) && queryParams.length > 0)
|
if ((queryParams) && queryParams.length > 0)
|
||||||
url += '?' + queryParams;
|
url += '?' + queryParams;
|
||||||
return url;
|
return url;
|
||||||
};
|
};
|
||||||
@@ -2584,7 +2599,7 @@ var SwaggerRequest = function (type, url, params, opts, successCallback, errorCa
|
|||||||
}
|
}
|
||||||
|
|
||||||
var obj;
|
var obj;
|
||||||
if (!((this.headers != null) && (this.headers.mock != null))) {
|
if (!((this.headers) && (this.headers.mock))) {
|
||||||
obj = {
|
obj = {
|
||||||
url: this.url,
|
url: this.url,
|
||||||
method: this.type,
|
method: this.type,
|
||||||
@@ -2953,7 +2968,9 @@ e.ApiKeyAuthorization = ApiKeyAuthorization;
|
|||||||
e.PasswordAuthorization = PasswordAuthorization;
|
e.PasswordAuthorization = PasswordAuthorization;
|
||||||
e.CookieAuthorization = CookieAuthorization;
|
e.CookieAuthorization = CookieAuthorization;
|
||||||
e.SwaggerClient = SwaggerClient;
|
e.SwaggerClient = SwaggerClient;
|
||||||
|
e.SwaggerApi = SwaggerClient;
|
||||||
e.Operation = Operation;
|
e.Operation = Operation;
|
||||||
e.Model = Model;
|
e.Model = Model;
|
||||||
e.models = models;
|
e.addModel = addModel;
|
||||||
|
|
||||||
})();
|
})();
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "swagger-ui",
|
"name": "swagger-ui",
|
||||||
"author": "Tony Tam <fehguy@gmail.com>",
|
"author": "Tony Tam <fehguy@gmail.com>",
|
||||||
"description": "Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API",
|
"description": "Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API",
|
||||||
"version": "2.1.2-M1",
|
"version": "2.1.3-M1",
|
||||||
"homepage": "http://swagger.io",
|
"homepage": "http://swagger.io",
|
||||||
"license": "Apache 2.0",
|
"license": "Apache 2.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"shred": "0.8.10",
|
"shred": "0.8.10",
|
||||||
"btoa": "1.1.1",
|
"btoa": "1.1.1",
|
||||||
"swagger-client": "2.1.2-M1"
|
"swagger-client": "2.1.3-M1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"chai": "^1.10.0",
|
"chai": "^1.10.0",
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ class SwaggerUi extends Backbone.Router
|
|||||||
@headerView.update(url)
|
@headerView.update(url)
|
||||||
|
|
||||||
@api = new SwaggerClient(@options)
|
@api = new SwaggerClient(@options)
|
||||||
@api.build()
|
|
||||||
|
|
||||||
# collapse all sections
|
# collapse all sections
|
||||||
collapseAll:() ->
|
collapseAll:() ->
|
||||||
@@ -90,7 +89,7 @@ class SwaggerUi extends Backbone.Router
|
|||||||
setTimeout(
|
setTimeout(
|
||||||
=>
|
=>
|
||||||
Docs.shebang()
|
Docs.shebang()
|
||||||
400
|
4000
|
||||||
)
|
)
|
||||||
|
|
||||||
buildUrl: (base, url) ->
|
buildUrl: (base, url) ->
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
if (url && url.length > 1) {
|
if (url && url.length > 1) {
|
||||||
url = decodeURIComponent(url[1]);
|
url = decodeURIComponent(url[1]);
|
||||||
} else {
|
} else {
|
||||||
url = "http://petstore.swagger.wordnik.com/v2/swagger.json";
|
url = "http://petstore.swagger.io/v2/swagger.json";
|
||||||
}
|
}
|
||||||
window.swaggerUi = new SwaggerUi({
|
window.swaggerUi = new SwaggerUi({
|
||||||
url: url,
|
url: url,
|
||||||
|
|||||||
Reference in New Issue
Block a user