diff --git a/dist/swagger-ui.js b/dist/swagger-ui.js
index 5678f451..8f4c3a59 100644
--- a/dist/swagger-ui.js
+++ b/dist/swagger-ui.js
@@ -359,6 +359,7 @@ window.Docs = {
// e.g. /docs/#!/words/get_search
var fragments = $.param.fragment().split('/');
fragments.shift(); // get rid of the bang
+ fragments = _.map(fragments, decodeURIComponent); // decode encoded paths
switch (fragments.length) {
case 1:
@@ -366,22 +367,22 @@ window.Docs = {
var dom_id = 'resource_' + fragments[0];
Docs.expandEndpointListForResource(fragments[0]);
- $("#"+dom_id).slideto({highlight: false});
+ $('[id="' + dom_id + '"]').slideto({highlight: false});
break;
case 2:
// Refer to the endpoint DOM element, e.g. #words_get_search
// Expand Resource
Docs.expandEndpointListForResource(fragments[0]);
- $("#"+dom_id).slideto({highlight: false});
+ // $("#"+dom_id).slideto({highlight: false});
// Expand operation
var li_dom_id = fragments.join('_');
var li_content_dom_id = li_dom_id + "_content";
- Docs.expandOperation($('#'+li_content_dom_id));
- $('#'+li_dom_id).slideto({highlight: false});
+ Docs.expandOperation($('[id="' + li_content_dom_id + '"]'));
+ $('[id="' + li_dom_id + '"]').slideto({highlight: false});
break;
}
@@ -475,37 +476,37 @@ Handlebars.registerHelper('sanitize', function(html) {
this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = "
"
+ escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0))
- + "
\n ";
stack1 = lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.description : stack1), depth0);
if (stack1 != null) { buffer += stack1; }
- buffer += "
\n";
+ buffer += "\r\n";
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.externalDocs : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
buffer += " ";
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
- buffer += "\n ";
+ buffer += "\r\n ";
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), {"name":"if","hash":{},"fn":this.program(6, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
- buffer += "\n ";
+ buffer += "\r\n ";
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1), {"name":"if","hash":{},"fn":this.program(8, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
- buffer += "\n ";
+ buffer += "\r\n ";
stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
- buffer += "\n ";
+ buffer += "\r\n ";
stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1), {"name":"if","hash":{},"fn":this.program(12, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
- return buffer + "\n";
+ return buffer + "\r\n";
},"2":function(depth0,helpers,partials,data) {
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
- return " "
+ escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.description : stack1), depth0))
- + "
\n api version: "
+ escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), depth0))
- + "\n ";
+ + "\r\n ";
},"16":function(depth0,helpers,partials,data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return " \n \n";
+ + "\">\r\n \r\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";
+ var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "
\r\n";
stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.info : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
- buffer += "
\n
\n
\n\n \r\n
\n";
+ return buffer + " \r\n
\r\n
\r\n";
},"useData":true});
this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
return "deprecated";
},"3":function(depth0,helpers,partials,data) {
- return "
Warning: Deprecated
\n";
+ return "
Warning: Deprecated
\r\n";
},"5":function(depth0,helpers,partials,data) {
- var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, buffer = "
Implementation Notes
\n
";
+ var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, buffer = "
Implementation Notes
\r\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; }
- return buffer + "
\n";
+ return buffer + "\r\n";
},"7":function(depth0,helpers,partials,data) {
- return "
\n
";
+ return "
\r\n
";
},"9":function(depth0,helpers,partials,data) {
- var stack1, buffer = "
\r\n";
},"10":function(depth0,helpers,partials,data) {
var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = "
"
+ escapeExpression(lambda((depth0 != null ? depth0.scope : depth0), depth0))
- + "
\n";
+ + "
\r\n";
},"12":function(depth0,helpers,partials,data) {
return "
";
},"14":function(depth0,helpers,partials,data) {
- return "
\n \n
\n";
+ return "
\r\n \r\n
\r\n";
},"16":function(depth0,helpers,partials,data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
return "
Response Class (Status "
+ escapeExpression(((helper = (helper = helpers.successCode || (depth0 != null ? depth0.successCode : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"successCode","hash":{},"data":data}) : helper)))
- + ")
\n
\n
\n
\n";
+ + ")\r\n
\r\n
\r\n
\r\n";
},"18":function(depth0,helpers,partials,data) {
- return "
Parameters
\n
\n \n \n | Parameter | \n Value | \n Description | \n Parameter Type | \n Data Type | \n
\n \n \n\n \n
\n";
+ return "
Parameters
\r\n
\r\n \r\n \r\n | Parameter | \r\n Value | \r\n Description | \r\n Parameter Type | \r\n Data Type | \r\n
\r\n \r\n \r\n\r\n \r\n
\r\n";
},"20":function(depth0,helpers,partials,data) {
- return "
\n
Response Messages
\n
\n \n \n | HTTP Status Code | \n Reason | \n Response Model | \n Headers | \n
\n \n \n\n \n
\n";
+ return "
\r\n
Response Messages
\r\n
\r\n \r\n \r\n | HTTP Status Code | \r\n Reason | \r\n Response Model | \r\n Headers | \r\n
\r\n \r\n \r\n\r\n \r\n
\r\n";
},"22":function(depth0,helpers,partials,data) {
return "";
},"24":function(depth0,helpers,partials,data) {
- return "
\n";
+ return "
\r\n";
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
- var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "\n
\r\n";
},"useData":true});
this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
var stack1, buffer = "";
@@ -956,11 +957,11 @@ this["Handlebars"]["templates"]["resource"] = Handlebars.template({"1":function(
return " : ";
},"3":function(depth0,helpers,partials,data) {
var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
- return "
\n Raw\n \n";
+ + "'>Raw\r\n \r\n";
},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
- var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "
\n
\n";
+ + "_endpoint_list' style='display:none'>\r\n\r\n\r\n";
},"useData":true});
this["Handlebars"]["templates"]["response_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
var stack1, buffer = "";
@@ -1020,23 +1021,23 @@ this["Handlebars"]["templates"]["signature"] = Handlebars.template({"compiler":[
},"useData":true});
this["Handlebars"]["templates"]["status_code"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
var lambda=this.lambda, escapeExpression=this.escapeExpression;
- return "
\n | "
+ return " |
\r\n | "
+ escapeExpression(lambda((data && data.key), depth0))
- + " | \n "
+ + " | \r\n "
+ escapeExpression(lambda((depth0 != null ? depth0.description : depth0), depth0))
- + " | \n "
+ + " | \r\n "
+ escapeExpression(lambda((depth0 != null ? depth0.type : depth0), depth0))
- + " | \n
\n";
+ + "\r\n \r\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 = "
"
+ 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)))
- + " | \n
";
+ + " | \r\n
";
stack1 = ((helper = (helper = helpers.message || (depth0 != null ? depth0.message : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"message","hash":{},"data":data}) : helper));
if (stack1 != null) { buffer += stack1; }
- buffer += " | \n
| \n";
},"useData":true});
'use strict';
@@ -1341,6 +1342,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
this.auths = opts.auths;
this.parentId = this.model.parentId;
this.nickname = this.model.nickname;
+ this.model.encodedParentId = encodeURIComponent(this.parentId);
return this;
},
@@ -1715,9 +1717,6 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
if (window.authorizations) {
window.authorizations.apply(obj);
}
- if (params === 0) {
- obj.data.append('fake', 'true');
- }
jQuery.ajax(obj);
return false;
// end of file-upload nastiness
diff --git a/dist/swagger-ui.min.js b/dist/swagger-ui.min.js
index a8b7dcc8..112f61c7 100644
--- a/dist/swagger-ui.min.js
+++ b/dist/swagger-ui.min.js
@@ -1,2 +1,2 @@
-(function(){"use strict";window.SwaggerUi=Backbone.Router.extend({dom_id:"swagger_ui",options:null,api:null,headerView:null,mainView:null,initialize:function(e){e=e||{},e.dom_id&&(this.dom_id=e.dom_id,delete e.dom_id),e.supportedSubmitMethods||(e.supportedSubmitMethods=["get","put","post","delete","head","options","patch"]),$("#"+this.dom_id).length||$("body").append('
'),this.options=e,marked.setOptions({gfm:!0});var n=this;this.options.success=function(){return n.render()},this.options.progress=function(e){return n.showMessage(e)},this.options.failure=function(e){return n.onLoadFailure(e)},this.headerView=new SwaggerUi.Views.HeaderView({el:$("#header")}),this.headerView.on("update-swagger-ui",function(e){return n.updateSwaggerUi(e)})},setOption:function(e,n){this.options[e]=n},getOption:function(e){return this.options[e]},updateSwaggerUi:function(e){this.options.url=e.url,this.load()},load:function(){this.mainView&&this.mainView.clear();var e=this.options.url;e&&0!==e.indexOf("http")&&(e=this.buildUrl(window.location.href.toString(),e)),this.options.url=e,this.headerView.update(e),this.api=new SwaggerClient(this.options)},collapseAll:function(){Docs.collapseEndpointListForResource("")},listAll:function(){Docs.collapseOperationsForResource("")},expandAll:function(){Docs.expandOperationsForResource("")},render:function(){switch(this.showMessage("Finished Loading Resource Information. Rendering Swagger UI..."),this.mainView=new SwaggerUi.Views.MainView({model:this.api,el:$("#"+this.dom_id),swaggerOptions:this.options,router:this}).render(),this.showMessage(),this.options.docExpansion){case"full":this.expandAll();break;case"list":this.listAll()}this.renderGFM(),this.options.onComplete&&this.options.onComplete(this.api,this),setTimeout(Docs.shebang.bind(this),100)},buildUrl:function(e,n){if(0===n.indexOf("/")){var t=e.split("/");return e=t[0]+"//"+t[2],e+n}var a=e.length;return e.indexOf("?")>-1&&(a=Math.min(a,e.indexOf("?"))),e.indexOf("#")>-1&&(a=Math.min(a,e.indexOf("#"))),e=e.substring(0,a),-1!==e.indexOf("/",e.length-1)?e+n:e+"/"+n},showMessage:function(e){void 0===e&&(e=""),$("#message-bar").removeClass("message-fail"),$("#message-bar").addClass("message-success"),$("#message-bar").html(e)},onLoadFailure:function(e){void 0===e&&(e=""),$("#message-bar").removeClass("message-success"),$("#message-bar").addClass("message-fail");var n=$("#message-bar").html(e);return this.options.onFailure&&this.options.onFailure(e),n},renderGFM:function(){$(".markdown").each(function(){$(this).html(marked($(this).html()))})}}),window.SwaggerUi.Views={},function(){function e(e){"console"in window&&"function"==typeof window.console.warn&&console.warn(e)}window.authorizations={add:function(){if(e("using window.authorizations is depreciated. Please use waggerUi.api.clientAuthorizations.add()."),"undefined"==typeof window.swaggerUi)throw new TypeError("window.swaggerUi is not defined");window.swaggerUi instanceof SwaggerUi&&window.swaggerUi.api.clientAuthorizations.add.apply(window.swaggerUi.api.clientAuthorizations,arguments)}},window.ApiKeyAuthorization=function(){e("window.ApiKeyAuthorization is depreciated. Please use SwaggerClient.ApiKeyAuthorization."),SwaggerClient.ApiKeyAuthorization.apply(window,arguments)},window.PasswordAuthorization=function(){e("window.PasswordAuthorization is depreciated. Please use SwaggerClient.PasswordAuthorization."),SwaggerClient.PasswordAuthorization.apply(window,arguments)}}(),this.Handlebars=this.Handlebars||{},this.Handlebars.templates=this.Handlebars.templates||{},this.Handlebars.templates.apikey_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s="function",l=n.helperMissing,r=this.escapeExpression;return"\n
\n\n'},useData:!0}),this.Handlebars.templates.basic_auth_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(){return'
\n
\n\n'},useData:!0}),this.Handlebars.templates.content_type=Handlebars.template({1:function(e,n,t,a){var i,s="";return i=n.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,a),inverse:this.noop,data:a}),null!=i&&(s+=i),s},2:function(e){var n,t=this.lambda,a='
\n"},4:function(){return'
\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,n,t,a){var i,s='
\n
\n"},useData:!0}),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),n=$(this).parent().height(),t=(n-e)/2;$(this).css("margin-top",t)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),n=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),t=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-n-t)})},$("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:var n="resource_"+e[0];Docs.expandEndpointListForResource(e[0]),$("#"+n).slideto({highlight:!1});break;case 2:Docs.expandEndpointListForResource(e[0]),$("#"+n).slideto({highlight:!1});var t=e.join("_"),a=t+"_content";Docs.expandOperation($("#"+a)),$("#"+t).slideto({highlight:!1})}},toggleEndpointListForResource:function(e){var n=$("li#resource_"+Docs.escapeResourceName(e)+" ul.endpoints");n.is(":visible")?Docs.collapseEndpointListForResource(e):Docs.expandEndpointListForResource(e)},expandEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideDown();$("li#resource_"+e).addClass("active");var n=$("li#resource_"+e+" ul.endpoints");n.slideDown()},collapseEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideUp();$("li#resource_"+e).removeClass("active");var n=$("li#resource_"+e+" ul.endpoints");n.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(/