diff --git a/dist/css/print.css b/dist/css/print.css
index 7c3bd79e..7e97db50 100644
--- a/dist/css/print.css
+++ b/dist/css/print.css
@@ -1193,6 +1193,24 @@
text-decoration: underline;
cursor: pointer;
}
+.swagger-section .authorize__btn_operation {
+ height: 18px;
+ vertical-align: middle;
+ display: inline-block;
+ background: url(../images/explorer_icons.png) no-repeat;
+}
+.swagger-section .authorize__btn_operation_login {
+ background-position: 0 0;
+ width: 18px;
+ margin-top: -6px;
+ margin-left: 4px;
+}
+.swagger-section .authorize__btn_operation_logout {
+ background-position: -30px 0;
+ width: 18px;
+ margin-top: -6px;
+ margin-left: 4px;
+}
.swagger-section #auth_container {
color: #fff;
display: inline-block;
@@ -1208,8 +1226,9 @@
padding: 0 0 10px;
margin-bottom: 5px;
border-bottom: solid 1px #CCC;
+ font-size: 0.9em;
}
-.swagger-section .auth_container .basic_auth__title {
+.swagger-section .auth_container .auth__title {
color: #547f00;
font-size: 1.2em;
}
@@ -1225,8 +1244,12 @@
margin-top: 10px;
height: 30px;
}
-.swagger-section .auth_container .basic_auth_container {
- font-size: 0.9em;
+.swagger-section .auth_container .key_auth__field {
+ margin: 5px 0;
+}
+.swagger-section .auth_container .key_auth__label {
+ display: inline-block;
+ width: 60px;
}
.swagger-section .api-popup-dialog {
z-index: 10000;
diff --git a/dist/css/screen.css b/dist/css/screen.css
index 15e76de0..c004f419 100644
--- a/dist/css/screen.css
+++ b/dist/css/screen.css
@@ -1193,6 +1193,24 @@
text-decoration: underline;
cursor: pointer;
}
+.swagger-section .authorize__btn_operation {
+ height: 18px;
+ vertical-align: middle;
+ display: inline-block;
+ background: url(../images/explorer_icons.png) no-repeat;
+}
+.swagger-section .authorize__btn_operation_login {
+ background-position: 0 0;
+ width: 18px;
+ margin-top: -6px;
+ margin-left: 4px;
+}
+.swagger-section .authorize__btn_operation_logout {
+ background-position: -30px 0;
+ width: 18px;
+ margin-top: -6px;
+ margin-left: 4px;
+}
.swagger-section #auth_container {
color: #fff;
display: inline-block;
@@ -1208,8 +1226,9 @@
padding: 0 0 10px;
margin-bottom: 5px;
border-bottom: solid 1px #CCC;
+ font-size: 0.9em;
}
-.swagger-section .auth_container .basic_auth__title {
+.swagger-section .auth_container .auth__title {
color: #547f00;
font-size: 1.2em;
}
@@ -1225,8 +1244,12 @@
margin-top: 10px;
height: 30px;
}
-.swagger-section .auth_container .basic_auth_container {
- font-size: 0.9em;
+.swagger-section .auth_container .key_auth__field {
+ margin: 5px 0;
+}
+.swagger-section .auth_container .key_auth__label {
+ display: inline-block;
+ width: 60px;
}
.swagger-section .api-popup-dialog {
z-index: 10000;
@@ -1350,6 +1373,7 @@
background-color: #89bf04;
padding: 9px 14px 19px 14px;
height: 23px;
+ min-width: 775px;
}
.swagger-section #input_baseUrl {
width: 400px;
diff --git a/dist/swagger-ui.js b/dist/swagger-ui.js
index 760e8f88..cd053a37 100644
--- a/dist/swagger-ui.js
+++ b/dist/swagger-ui.js
@@ -8,41 +8,45 @@
this["Handlebars"]["templates"] = this["Handlebars"]["templates"] || {};
this["Handlebars"]["templates"]["apikey_auth"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
- return " "
+ return " "
+ 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)))
+ " \n";
},"3":function(depth0,helpers,partials,data) {
- return " \n";
+ return " \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 = "\n";
},"useData":true});
this["Handlebars"]["templates"]["auth_button_operation"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
- return " ic-info\n";
+ return " authorize__btn_operation_login\n";
},"3":function(depth0,helpers,partials,data) {
- return " ic-error\n";
+ return " authorize__btn_operation_logout\n";
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
- var stack1, buffer = "\n \n
";
+ return buffer + "\">\n\n";
},"useData":true});
this["Handlebars"]["templates"]["auth_button"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
return "Authorize \n";
},"useData":true});
this["Handlebars"]["templates"]["auth_view"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+ return " Authorize \n";
+ },"3":function(depth0,helpers,partials,data) {
return " Logout \n";
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
- var stack1, buffer = "\n\n
\n
\n
Authorize \n";
- stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isLogout : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
+ var stack1, buffer = "
\n\n
\n
\n";
+ stack1 = helpers.unless.call(depth0, (depth0 != null ? depth0.isLogout : depth0), {"name":"unless","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
+ if (stack1 != null) { buffer += stack1; }
+ stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isAuthorized : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
return buffer + "
\n\n
\n";
},"useData":true});
@@ -50,17 +54,26 @@ this["Handlebars"]["templates"]["basic_auth"] = Handlebars.template({"1":functio
return " - authorized";
},"3":function(depth0,helpers,partials,data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
- return "
\n";
-},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
- var stack1, buffer = "
\n
Basic authentication";
+ return " "
+ + escapeExpression(((helper = (helper = helpers.username || (depth0 != null ? depth0.username : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"username","hash":{},"data":data}) : helper)))
+ + " \n";
+},"5":function(depth0,helpers,partials,data) {
+ return " \n";
+ },"7":function(depth0,helpers,partials,data) {
+ return " \n password: \n \n
\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 = "\n
Basic authentication";
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isLogout : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
- buffer += " \n";
- stack1 = helpers.unless.call(depth0, (depth0 != null ? depth0.isLogout : depth0), {"name":"unless","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data});
+ buffer += "\n
\n";
+ stack1 = helpers.unless.call(depth0, (depth0 != null ? depth0.isLogout : depth0), {"name":"unless","hash":{},"fn":this.program(7, data),"inverse":this.noop,"data":data});
+ if (stack1 != null) { buffer += stack1; }
+ return buffer + " \n\n";
},"useData":true});
this["Handlebars"]["templates"]["content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
var stack1, buffer = "";
@@ -461,36 +474,36 @@ this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(dept
return buffer + " \n
\n
\n";
},"useData":true});
this["Handlebars"]["templates"]["oauth2"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
- var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = " \n \n "
+ + "\"/>\n "
+ escapeExpression(((helper = (helper = helpers.scope || (depth0 != null ? depth0.scope : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"scope","hash":{},"data":data}) : helper)))
- + " \n "
+ + " \n "
+ escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)))
+ "\n";
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.OAuthSchemeKey : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
- return buffer + " \n \n";
+ return buffer + " \n \n";
},"2":function(depth0,helpers,partials,data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
- return " ("
+ return " ("
+ escapeExpression(((helper = (helper = helpers.OAuthSchemeKey || (depth0 != null ? depth0.OAuthSchemeKey : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"OAuthSchemeKey","hash":{},"data":data}) : helper)))
+ ")\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 = "
"
+ var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "
\n
Select OAuth2.0 Scopes \n
"
+ escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)))
- + "
\n
Select OAuth2.0 Scopes
\n
Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\n Learn how to use \n
\n
"
+ + "
\n
Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\n Learn how to use \n
\n
"
+ escapeExpression(((helper = (helper = helpers.appName || (depth0 != null ? depth0.appName : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"appName","hash":{},"data":data}) : helper)))
- + " API requires the following scopes. Select which ones you want to grant to Swagger UI.
\n
Authorization URL: "
+ + " API requires the following scopes. Select which ones you want to grant to Swagger UI.
\n
Authorization URL: "
+ escapeExpression(((helper = (helper = helpers.authorizationUrl || (depth0 != null ? depth0.authorizationUrl : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"authorizationUrl","hash":{},"data":data}) : helper)))
- + "
\n
flow: "
+ + "
\n
flow: "
+ escapeExpression(((helper = (helper = helpers.flow || (depth0 != null ? depth0.flow : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"flow","hash":{},"data":data}) : helper)))
- + "
\n\n
";
},"useData":true});
this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
return "deprecated";
@@ -19175,8 +19188,13 @@ window.SwaggerUi.utils = {
}
}
- authsArr.push(singleSecurity);
- oauth2Arr.push(singleOauth2Security);
+ if (!_.isEmpty(singleSecurity)) {
+ authsArr.push(singleSecurity);
+ }
+
+ if (!_.isEmpty(singleOauth2Security)){
+ oauth2Arr.push(singleOauth2Security);
+ }
});
return {
@@ -19199,6 +19217,28 @@ window.SwaggerUi.utils = {
};
'use strict';
+SwaggerUi.Models.ApiKeyAuthModel = Backbone.Model.extend({
+ defaults: {
+ 'in': '',
+ name: '',
+ title: '',
+ value: ''
+ },
+
+ initialize: function () {
+ this.on('change', this.validate);
+ },
+
+ validate: function () {
+ var valid = !!this.get('value');
+
+ this.set('valid', valid);
+
+ return valid;
+ }
+});
+'use strict';
+
SwaggerUi.Views.ApiKeyAuthView = Backbone.View.extend({ // TODO: append this to global SwaggerUi
events: {
@@ -19221,12 +19261,11 @@ SwaggerUi.Views.ApiKeyAuthView = Backbone.View.extend({ // TODO: append this to
apiKeyChange: function (e) {
var val = $(e.target).val();
- this.model.set('valid', !!val);
this.model.set('value', val);
},
isValid: function () {
- return this.get('valid');
+ return this.model.validate();
}
});
@@ -19311,6 +19350,12 @@ SwaggerUi.Collections.AuthsCollection = Backbone.Collection.extend({
case 'oauth2':
result = new SwaggerUi.Models.Oauth2Model(model);
break;
+ case 'basic':
+ result = new SwaggerUi.Models.BasicAuthModel(model);
+ break;
+ case 'apiKey':
+ result = new SwaggerUi.Models.ApiKeyAuthModel(model);
+ break;
default:
result = new Backbone.Model(model);
}
@@ -19325,6 +19370,10 @@ SwaggerUi.Collections.AuthsCollection = Backbone.Collection.extend({
isAuthorized: function () {
return this.length === this.where({ isLogout: true }).length;
+ },
+
+ isPartiallyAuthorized: function () {
+ return this.where({ isLogout: true }).length > 0;
}
});
'use strict';
@@ -19362,7 +19411,10 @@ SwaggerUi.Views.AuthView = Backbone.View.extend({
this.collection = new SwaggerUi.Collections.AuthsCollection();
this.collection.add(this.parseData(opts.data));
- this.$el.html(this.tpls.main({isLogout: this.collection.isAuthorized()}));
+ this.$el.html(this.tpls.main({
+ isLogout: this.collection.isAuthorized(),
+ isAuthorized: this.collection.isPartiallyAuthorized()
+ }));
this.$innerEl = this.$(this.selectors.innerEl);
},
@@ -19386,15 +19438,21 @@ SwaggerUi.Views.AuthView = Backbone.View.extend({
},
parseData: function (data) {
- var authz = window.swaggerUi.api.clientAuthorizations.authz;
+ var authz = Object.assign({}, window.swaggerUi.api.clientAuthorizations.authz);
return _.map(data, function (auth, name) {
var isBasic = authz.basic && auth.type === 'basic';
+ _.extend(auth, {
+ title: name
+ });
+
if (authz[name] || isBasic) {
_.extend(auth, {
isLogout: true,
- value: isBasic ? '' : authz[name].value,
+ value: isBasic ? undefined : authz[name].value,
+ username: isBasic ? authz.basic.username : undefined,
+ password: isBasic ? authz.basic.password : undefined,
valid: true
});
}
@@ -19437,7 +19495,7 @@ SwaggerUi.Views.AuthView = Backbone.View.extend({
auth.get('in')
);
- this.router.api.clientAuthorizations.add(auth.get('name'), keyAuth);
+ this.router.api.clientAuthorizations.add(auth.get('title'), keyAuth);
} else if (type === 'basic') {
basicAuth = new SwaggerClient.PasswordAuthorization(auth.get('username'), auth.get('password'));
this.router.api.clientAuthorizations.add(auth.get('type'), basicAuth);
@@ -19453,7 +19511,7 @@ SwaggerUi.Views.AuthView = Backbone.View.extend({
e.preventDefault();
this.collection.forEach(function (auth) {
- var name = auth.get('name');
+ var name = auth.get('type') === 'basic' ? 'basic' : auth.get('title');
window.swaggerUi.api.clientAuthorizations.remove(name);
});
@@ -19550,6 +19608,27 @@ SwaggerUi.Views.AuthView = Backbone.View.extend({
'use strict';
+SwaggerUi.Models.BasicAuthModel = Backbone.Model.extend({
+ defaults: {
+ username: '',
+ password: '',
+ title: 'basic'
+ },
+
+ initialize: function () {
+ this.on('change', this.validate);
+ },
+
+ validate: function () {
+ var valid = !!this.get('password') && !!this.get('username');
+
+ this.set('valid', valid);
+
+ return valid;
+ }
+});
+'use strict';
+
SwaggerUi.Views.BasicAuthView = Backbone.View.extend({
initialize: function (opts) {
@@ -19575,11 +19654,10 @@ SwaggerUi.Views.BasicAuthView = Backbone.View.extend({
var attr = $el.prop('name');
this.model.set(attr, val);
- this.model.set('valid', !!this.model.get('password') && !!this.model.get('username'));
},
isValid: function () {
- return this.get('valid');
+ return this.model.validate();
}
});
@@ -19779,7 +19857,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
onLinkClick: function (e) {
var el = e.target;
- if (el.tagName === 'A') {
+ if (el.tagName === 'A' && el.href) {
if (location.hostname !== el.hostname || location.port !== el.port) {
e.preventDefault();
window.open(el.href, '_blank');
diff --git a/dist/swagger-ui.min.js b/dist/swagger-ui.min.js
index 37ffffa4..36b5d9a3 100644
--- a/dist/swagger-ui.min.js
+++ b/dist/swagger-ui.min.js
@@ -1,9 +1,9 @@
-(function(){function e(){e.history=e.history||[],e.history.push(arguments),this.console&&console.log(Array.prototype.slice.call(arguments)[0])}this.Handlebars=this.Handlebars||{},this.Handlebars.templates=this.Handlebars.templates||{},this.Handlebars.templates.apikey_auth=Handlebars.template({1:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return' '+s((r=null!=(r=t.value||(null!=e?e.value:e))?r:o,typeof r===a?r.call(e,{name:"value",hash:{},data:i}):r))+" \n"},3:function(e,t,n,i){return" \n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="\n"},useData:!0}),this.Handlebars.templates.auth_button_operation=Handlebars.template({1:function(e,t,n,i){return" ic-info\n"},3:function(e,t,n,i){return" ic-error\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a='\n \n
'},useData:!0}),this.Handlebars.templates.auth_button=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){return"Authorize \n"},useData:!0}),this.Handlebars.templates.auth_view=Handlebars.template({1:function(e,t,n,i){return' Logout \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a='\n\n
\n
\n Authorize \n';return r=t["if"].call(e,null!=e?e.isLogout:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.noop,data:i}),null!=r&&(a+=r),a+"
\n\n
\n"},useData:!0}),this.Handlebars.templates.basic_auth=Handlebars.template({1:function(e,t,n,i){return" - authorized"},3:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a="\n
Basic authentication";return r=t["if"].call(e,null!=e?e.isLogout:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.noop,data:i}),null!=r&&(a+=r),a+=" \n",r=t.unless.call(e,null!=e?e.isLogout:e,{name:"unless",hash:{},fn:this.program(3,i),inverse:this.noop,data:i}),null!=r&&(a+=r),a+"\n"},useData:!0}),this.Handlebars.templates.content_type=Handlebars.template({1:function(e,t,n,i){var r,a="";return r=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,i),inverse:this.noop,data:i}),null!=r&&(a+=r),a},2:function(e,t,n,i){var r=this.lambda,a=this.escapeExpression;return' '+a(r(e,e))+" \n"},4:function(e,t,n,i){return' application/json \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='Response Content Type \n\n';return r=t["if"].call(e,null!=e?e.produces:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.program(4,i),data:i}),null!=r&&(u+=r),u+" \n"},useData:!0}),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""===$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),Function.prototype.bind&&console&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call),window.Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:if(e[0].length>0){var t="resource_"+e[0];Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1})}break;case 2:Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1});var n=e.join("_"),i=n+"_content";Docs.expandOperation($("#"+i)),$("#"+n).slideto({highlight:!1})}},toggleEndpointListForResource:function(e){var t=$("li#resource_"+Docs.escapeResourceName(e)+" ul.endpoints");t.is(":visible")?($.bbq.pushState("#/",2),Docs.collapseEndpointListForResource(e)):($.bbq.pushState("#/"+e,2),Docs.expandEndpointListForResource(e))},expandEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideDown();$("li#resource_"+e).addClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideDown()},collapseEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideUp();$("li#resource_"+e).removeClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideUp()},expandOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideDown():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideUp():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(e){return e.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(e){e.slideDown()},collapseOperation:function(e){e.slideUp()}},Handlebars.registerHelper("sanitize",function(e){return e=e.replace(/