|
@@ -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; |
|
@@ -393,35 +385,22 @@ SwaggerUi = (function(_super) { |
|
|
|
|
|
|
|
|
window.SwaggerUi = SwaggerUi; |
|
|
window.SwaggerUi = SwaggerUi; |
|
|
|
|
|
|
|
|
this["Handlebars"]["templates"]["basic_auth_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { |
|
|
|
|
|
return "<div class='auth_button' id='basic_auth_button'><img class='auth_icon' src='images/password.jpeg'></div>\n<div class='auth_container' id='basic_auth_container'>\n <div class='key_input_container'>\n <div class=\"auth_label\">Username</div>\n <input placeholder=\"username\" class=\"auth_input\" id=\"input_username\" name=\"username\" type=\"text\"/>\n <div class=\"auth_label\">Password</div>\n <input placeholder=\"password\" class=\"auth_input\" id=\"input_password\" name=\"password\" type=\"password\"/>\n <div class='auth_submit'><a class='auth_submit_button' id=\"apply_basic_auth\" href=\"#\">apply</a></div>\n </div>\n</div>\n\n"; |
|
|
|
|
|
},"useData":true}); |
|
|
|
|
|
|
|
|
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); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
this["Handlebars"]["templates"]["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=\"contentType\"></label>\n<select name=\"contentType\">\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}); |
|
|
|
|
|
|
|
|
this["Handlebars"]["templates"]["basic_auth_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { |
|
|
|
|
|
return "<div class='auth_button' id='basic_auth_button'><img class='auth_icon' src='images/password.jpeg'></div>\n<div class='auth_container' id='basic_auth_container'>\n <div class='key_input_container'>\n <div class=\"auth_label\">Username</div>\n <input placeholder=\"username\" class=\"auth_input\" id=\"input_username\" name=\"username\" type=\"text\"/>\n <div class=\"auth_label\">Password</div>\n <input placeholder=\"password\" class=\"auth_input\" id=\"input_password\" name=\"password\" type=\"password\"/>\n <div class='auth_submit'><a class='auth_submit_button' id=\"apply_basic_auth\" href=\"#\">apply</a></div>\n </div>\n</div>\n\n"; |
|
|
|
|
|
},"useData":true}); |
|
|
var ApiKeyButton, |
|
|
var ApiKeyButton, |
|
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |
|
|
__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; |
|
@@ -475,6 +454,82 @@ ApiKeyButton = (function(_super) { |
|
|
|
|
|
|
|
|
})(Backbone.View); |
|
|
})(Backbone.View); |
|
|
|
|
|
|
|
|
|
|
|
this["Handlebars"]["templates"]["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=\"contentType\"></label>\n<select name=\"contentType\">\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 BasicAuthButton, |
|
|
|
|
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |
|
|
|
|
|
__hasProp = {}.hasOwnProperty; |
|
|
|
|
|
|
|
|
|
|
|
BasicAuthButton = (function(_super) { |
|
|
|
|
|
__extends(BasicAuthButton, _super); |
|
|
|
|
|
|
|
|
|
|
|
function BasicAuthButton() { |
|
|
|
|
|
return BasicAuthButton.__super__.constructor.apply(this, arguments); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BasicAuthButton.prototype.initialize = function() {}; |
|
|
|
|
|
|
|
|
|
|
|
BasicAuthButton.prototype.render = function() { |
|
|
|
|
|
var template; |
|
|
|
|
|
template = this.template(); |
|
|
|
|
|
$(this.el).html(template(this.model)); |
|
|
|
|
|
return this; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
BasicAuthButton.prototype.events = { |
|
|
|
|
|
"click #basic_auth_button": "togglePasswordContainer", |
|
|
|
|
|
"click #apply_basic_auth": "applyPassword" |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
BasicAuthButton.prototype.applyPassword = function() { |
|
|
|
|
|
var elem, password, username; |
|
|
|
|
|
username = $(".input_username").val(); |
|
|
|
|
|
password = $(".input_password").val(); |
|
|
|
|
|
window.authorizations.add(this.model.type, new PasswordAuthorization("basic", username, password)); |
|
|
|
|
|
window.swaggerUi.load(); |
|
|
|
|
|
return elem = $('#basic_auth_container').hide(); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
BasicAuthButton.prototype.togglePasswordContainer = function() { |
|
|
|
|
|
var elem; |
|
|
|
|
|
if ($('#basic_auth_container').length > 0) { |
|
|
|
|
|
elem = $('#basic_auth_container').show(); |
|
|
|
|
|
if (elem.is(':visible')) { |
|
|
|
|
|
return elem.slideUp(); |
|
|
|
|
|
} else { |
|
|
|
|
|
$('.auth_container').hide(); |
|
|
|
|
|
return elem.show(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
BasicAuthButton.prototype.template = function() { |
|
|
|
|
|
return Handlebars.templates.basic_auth_button_view; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return BasicAuthButton; |
|
|
|
|
|
|
|
|
|
|
|
})(Backbone.View); |
|
|
|
|
|
|
|
|
this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { |
|
|
this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { |
|
|
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = " <div class=\"info_title\">" |
|
|
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = " <div class=\"info_title\">" |
|
|
+ escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0)) |
|
|
+ escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0)) |
|
@@ -558,58 +613,32 @@ 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 BasicAuthButton, |
|
|
|
|
|
|
|
|
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; }, |
|
|
__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; |
|
|
|
|
|
|
|
|
BasicAuthButton = (function(_super) { |
|
|
|
|
|
__extends(BasicAuthButton, _super); |
|
|
|
|
|
|
|
|
ContentTypeView = (function(_super) { |
|
|
|
|
|
__extends(ContentTypeView, _super); |
|
|
|
|
|
|
|
|
function BasicAuthButton() { |
|
|
|
|
|
return BasicAuthButton.__super__.constructor.apply(this, arguments); |
|
|
|
|
|
|
|
|
function ContentTypeView() { |
|
|
|
|
|
return ContentTypeView.__super__.constructor.apply(this, arguments); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
BasicAuthButton.prototype.initialize = function() {}; |
|
|
|
|
|
|
|
|
ContentTypeView.prototype.initialize = function() {}; |
|
|
|
|
|
|
|
|
BasicAuthButton.prototype.render = function() { |
|
|
|
|
|
|
|
|
ContentTypeView.prototype.render = function() { |
|
|
var template; |
|
|
var template; |
|
|
template = this.template(); |
|
|
template = this.template(); |
|
|
$(this.el).html(template(this.model)); |
|
|
$(this.el).html(template(this.model)); |
|
|
|
|
|
$('label[for=contentType]', $(this.el)).text('Response Content Type'); |
|
|
return this; |
|
|
return this; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
BasicAuthButton.prototype.events = { |
|
|
|
|
|
"click #basic_auth_button": "togglePasswordContainer", |
|
|
|
|
|
"click #apply_basic_auth": "applyPassword" |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
BasicAuthButton.prototype.applyPassword = function() { |
|
|
|
|
|
var elem, password, username; |
|
|
|
|
|
username = $(".input_username").val(); |
|
|
|
|
|
password = $(".input_password").val(); |
|
|
|
|
|
window.authorizations.add(this.model.type, new PasswordAuthorization("basic", username, password)); |
|
|
|
|
|
window.swaggerUi.load(); |
|
|
|
|
|
return elem = $('#basic_auth_container').hide(); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
BasicAuthButton.prototype.togglePasswordContainer = function() { |
|
|
|
|
|
var elem; |
|
|
|
|
|
if ($('#basic_auth_container').length > 0) { |
|
|
|
|
|
elem = $('#basic_auth_container').show(); |
|
|
|
|
|
if (elem.is(':visible')) { |
|
|
|
|
|
return elem.slideUp(); |
|
|
|
|
|
} else { |
|
|
|
|
|
$('.auth_container').hide(); |
|
|
|
|
|
return elem.show(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
BasicAuthButton.prototype.template = function() { |
|
|
|
|
|
return Handlebars.templates.basic_auth_button_view; |
|
|
|
|
|
|
|
|
ContentTypeView.prototype.template = function() { |
|
|
|
|
|
return Handlebars.templates.content_type; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
return BasicAuthButton; |
|
|
|
|
|
|
|
|
return ContentTypeView; |
|
|
|
|
|
|
|
|
})(Backbone.View); |
|
|
})(Backbone.View); |
|
|
|
|
|
|
|
@@ -716,32 +745,68 @@ 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, |
|
|
|
|
|
|
|
|
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; |
|
|
|
|
|
|
|
|
ContentTypeView = (function(_super) { |
|
|
|
|
|
__extends(ContentTypeView, _super); |
|
|
|
|
|
|
|
|
HeaderView = (function(_super) { |
|
|
|
|
|
__extends(HeaderView, _super); |
|
|
|
|
|
|
|
|
function ContentTypeView() { |
|
|
|
|
|
return ContentTypeView.__super__.constructor.apply(this, arguments); |
|
|
|
|
|
|
|
|
function HeaderView() { |
|
|
|
|
|
return HeaderView.__super__.constructor.apply(this, arguments); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
ContentTypeView.prototype.initialize = function() {}; |
|
|
|
|
|
|
|
|
HeaderView.prototype.events = { |
|
|
|
|
|
'click #show-pet-store-icon': 'showPetStore', |
|
|
|
|
|
'click #show-wordnik-dev-icon': 'showWordnikDev', |
|
|
|
|
|
'click #explore': 'showCustom', |
|
|
|
|
|
'keyup #input_baseUrl': 'showCustomOnKeyup', |
|
|
|
|
|
'keyup #input_apiKey': 'showCustomOnKeyup' |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
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; |
|
|
|
|
|
|
|
|
HeaderView.prototype.initialize = function() {}; |
|
|
|
|
|
|
|
|
|
|
|
HeaderView.prototype.showPetStore = function(e) { |
|
|
|
|
|
return this.trigger('update-swagger-ui', { |
|
|
|
|
|
url: "http://petstore.swagger.wordnik.com/api/api-docs" |
|
|
|
|
|
}); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
ContentTypeView.prototype.template = function() { |
|
|
|
|
|
return Handlebars.templates.content_type; |
|
|
|
|
|
|
|
|
HeaderView.prototype.showWordnikDev = function(e) { |
|
|
|
|
|
return this.trigger('update-swagger-ui', { |
|
|
|
|
|
url: "http://api.wordnik.com/v4/resources.json" |
|
|
|
|
|
}); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
return ContentTypeView; |
|
|
|
|
|
|
|
|
HeaderView.prototype.showCustomOnKeyup = function(e) { |
|
|
|
|
|
if (e.keyCode === 13) { |
|
|
|
|
|
return this.showCustom(); |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
HeaderView.prototype.showCustom = function(e) { |
|
|
|
|
|
if (e != null) { |
|
|
|
|
|
e.preventDefault(); |
|
|
|
|
|
} |
|
|
|
|
|
return this.trigger('update-swagger-ui', { |
|
|
|
|
|
url: $('#input_baseUrl').val(), |
|
|
|
|
|
apiKey: $('#input_apiKey').val() |
|
|
|
|
|
}); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
HeaderView.prototype.update = function(url, apiKey, trigger) { |
|
|
|
|
|
if (trigger == null) { |
|
|
|
|
|
trigger = false; |
|
|
|
|
|
} |
|
|
|
|
|
$('#input_baseUrl').val(url); |
|
|
|
|
|
if (trigger) { |
|
|
|
|
|
return this.trigger('update-swagger-ui', { |
|
|
|
|
|
url: url |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return HeaderView; |
|
|
|
|
|
|
|
|
})(Backbone.View); |
|
|
})(Backbone.View); |
|
|
|
|
|
|
|
@@ -808,71 +873,6 @@ this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(dep |
|
|
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>\n <span class=\"model-signature\"></span>\n</td>\n"; |
|
|
},"useData":true}); |
|
|
},"useData":true}); |
|
|
var HeaderView, |
|
|
|
|
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |
|
|
|
|
|
__hasProp = {}.hasOwnProperty; |
|
|
|
|
|
|
|
|
|
|
|
HeaderView = (function(_super) { |
|
|
|
|
|
__extends(HeaderView, _super); |
|
|
|
|
|
|
|
|
|
|
|
function HeaderView() { |
|
|
|
|
|
return HeaderView.__super__.constructor.apply(this, arguments); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
HeaderView.prototype.events = { |
|
|
|
|
|
'click #show-pet-store-icon': 'showPetStore', |
|
|
|
|
|
'click #show-wordnik-dev-icon': 'showWordnikDev', |
|
|
|
|
|
'click #explore': 'showCustom', |
|
|
|
|
|
'keyup #input_baseUrl': 'showCustomOnKeyup', |
|
|
|
|
|
'keyup #input_apiKey': 'showCustomOnKeyup' |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
HeaderView.prototype.initialize = function() {}; |
|
|
|
|
|
|
|
|
|
|
|
HeaderView.prototype.showPetStore = function(e) { |
|
|
|
|
|
return this.trigger('update-swagger-ui', { |
|
|
|
|
|
url: "http://petstore.swagger.wordnik.com/api/api-docs" |
|
|
|
|
|
}); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
HeaderView.prototype.showWordnikDev = function(e) { |
|
|
|
|
|
return this.trigger('update-swagger-ui', { |
|
|
|
|
|
url: "http://api.wordnik.com/v4/resources.json" |
|
|
|
|
|
}); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
HeaderView.prototype.showCustomOnKeyup = function(e) { |
|
|
|
|
|
if (e.keyCode === 13) { |
|
|
|
|
|
return this.showCustom(); |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
HeaderView.prototype.showCustom = function(e) { |
|
|
|
|
|
if (e != null) { |
|
|
|
|
|
e.preventDefault(); |
|
|
|
|
|
} |
|
|
|
|
|
return this.trigger('update-swagger-ui', { |
|
|
|
|
|
url: $('#input_baseUrl').val(), |
|
|
|
|
|
apiKey: $('#input_apiKey').val() |
|
|
|
|
|
}); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
HeaderView.prototype.update = function(url, apiKey, trigger) { |
|
|
|
|
|
if (trigger == null) { |
|
|
|
|
|
trigger = false; |
|
|
|
|
|
} |
|
|
|
|
|
$('#input_baseUrl').val(url); |
|
|
|
|
|
if (trigger) { |
|
|
|
|
|
return this.trigger('update-swagger-ui', { |
|
|
|
|
|
url: url |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return HeaderView; |
|
|
|
|
|
|
|
|
|
|
|
})(Backbone.View); |
|
|
|
|
|
|
|
|
|
|
|
this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { |
|
|
this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":function(depth0,helpers,partials,data) { |
|
|
return " multiple='multiple'"; |
|
|
return " multiple='multiple'"; |
|
|
},"3":function(depth0,helpers,partials,data) { |
|
|
},"3":function(depth0,helpers,partials,data) { |
|
@@ -1075,39 +1075,6 @@ this["Handlebars"]["templates"]["param_readonly"] = Handlebars.template({"1":fun |
|
|
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"; |
|
|
},"useData":true}); |
|
|
},"useData":true}); |
|
|
this["Handlebars"]["templates"]["param_readonly_required"] = 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 = ""; |
|
|
|
|
|
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; } |
|
|
|
|
|
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) { |
|
|
|
|
|
return " (empty)\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(3, data),"data":data}); |
|
|
|
|
|
if (stack1 != null) { buffer += stack1; } |
|
|
|
|
|
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)); |
|
|
|
|
|
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}); |
|
|
|
|
|
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; }, |
|
|
__hasProp = {}.hasOwnProperty; |
|
|
__hasProp = {}.hasOwnProperty; |
|
@@ -1722,6 +1689,39 @@ OperationView = (function(_super) { |
|
|
|
|
|
|
|
|
})(Backbone.View); |
|
|
})(Backbone.View); |
|
|
|
|
|
|
|
|
|
|
|
this["Handlebars"]["templates"]["param_readonly_required"] = 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 = ""; |
|
|
|
|
|
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; } |
|
|
|
|
|
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) { |
|
|
|
|
|
return " (empty)\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(3, data),"data":data}); |
|
|
|
|
|
if (stack1 != null) { buffer += stack1; } |
|
|
|
|
|
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)); |
|
|
|
|
|
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}); |
|
|
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; }, |
|
|
__hasProp = {}.hasOwnProperty; |
|
|
__hasProp = {}.hasOwnProperty; |
|
@@ -1819,27 +1819,6 @@ this["Handlebars"]["templates"]["param_required"] = Handlebars.template({"1":fun |
|
|
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"; |
|
|
},"useData":true}); |
|
|
},"useData":true}); |
|
|
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}); |
|
|
|
|
|
var ParameterView, |
|
|
var ParameterView, |
|
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |
|
|
__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; |
|
@@ -1949,6 +1928,27 @@ ParameterView = (function(_super) { |
|
|
|
|
|
|
|
|
})(Backbone.View); |
|
|
})(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}); |
|
|
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; }, |
|
|
__hasProp = {}.hasOwnProperty; |
|
|
__hasProp = {}.hasOwnProperty; |
|
|