diff --git a/dist/css/print.css b/dist/css/print.css
index 2e6b3103..8329a2cc 100644
--- a/dist/css/print.css
+++ b/dist/css/print.css
@@ -82,7 +82,7 @@
.swagger-section pre .vhdl .attribute,
.swagger-section pre .clojure .attribute,
.swagger-section pre .coffeescript .property {
- color: #8888ff;
+ color: #88F;
}
.swagger-section pre .keyword,
.swagger-section pre .id,
diff --git a/dist/css/screen.css b/dist/css/screen.css
index ef4673db..49b8934e 100644
--- a/dist/css/screen.css
+++ b/dist/css/screen.css
@@ -82,7 +82,7 @@
.swagger-section pre .vhdl .attribute,
.swagger-section pre .clojure .attribute,
.swagger-section pre .coffeescript .property {
- color: #8888ff;
+ color: #88F;
}
.swagger-section pre .keyword,
.swagger-section pre .id,
diff --git a/dist/fonts/DroidSans-Bold.ttf b/dist/fonts/DroidSans-Bold.ttf
index 942bbf5b..befea09e 100644
Binary files a/dist/fonts/DroidSans-Bold.ttf and b/dist/fonts/DroidSans-Bold.ttf differ
diff --git a/dist/fonts/DroidSans.ttf b/dist/fonts/DroidSans.ttf
index efd1f8bb..71e547f7 100644
Binary files a/dist/fonts/DroidSans.ttf and b/dist/fonts/DroidSans.ttf differ
diff --git a/dist/swagger-ui.js b/dist/swagger-ui.js
index 2594709c..e9a84bae 100644
--- a/dist/swagger-ui.js
+++ b/dist/swagger-ui.js
@@ -429,14 +429,30 @@ this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function
if (stack1 != null) { buffer += stack1; }
return buffer + "";
},"19":function(depth0,helpers,partials,data) {
+ var stack1, buffer = "
Headers
\n \n";
+},"20":function(depth0,helpers,partials,data) {
+ var lambda=this.lambda, escapeExpression=this.escapeExpression;
+ return " \n | "
+ + escapeExpression(lambda((data && data.key), depth0))
+ + " | \n "
+ + escapeExpression(lambda((depth0 != null ? depth0.description : depth0), depth0))
+ + " | \n "
+ + escapeExpression(lambda((depth0 != null ? depth0.type : depth0), depth0))
+ + " | \n "
+ + escapeExpression(lambda((depth0 != null ? depth0.other : depth0), depth0))
+ + " | \n
\n";
+},"22":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";
- },"21":function(depth0,helpers,partials,data) {
+ },"24":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";
- },"23":function(depth0,helpers,partials,data) {
+ },"26":function(depth0,helpers,partials,data) {
return "";
-},"25":function(depth0,helpers,partials,data) {
+},"28":function(depth0,helpers,partials,data) {
return " \n";
- },"27":function(depth0,helpers,partials,data) {
+ },"30":function(depth0,helpers,partials,data) {
return " Request Headers
\n \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 - \n \n";
- stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.parameters : depth0), {"name":"if","hash":{},"fn":this.program(19, data),"inverse":this.noop,"data":data});
+ buffer += "\n";
+ stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.headers : depth0), {"name":"if","hash":{},"fn":this.program(19, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
- stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.responseMessages : depth0), {"name":"if","hash":{},"fn":this.program(21, data),"inverse":this.noop,"data":data});
+ buffer += "\n \n
\n
Curl
\n
\n
Request URL
\n
\n";
- stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.showRequestHeaders : depth0), {"name":"if","hash":{},"fn":this.program(27, data),"inverse":this.noop,"data":data});
+ stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.showRequestHeaders : depth0), {"name":"if","hash":{},"fn":this.program(30, data),"inverse":this.noop,"data":data});
if (stack1 != null) { buffer += stack1; }
return buffer + "
Response Body
\n
\n
Response Code
\n
\n
Response Headers
\n \n
\n \n \n
\n";
},"useData":true});
@@ -25344,7 +25363,8 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
this.model.responseMessages.push({
code: code,
message: value.description,
- responseModel: schema
+ responseModel: schema,
+ headers: value.headers
});
}
}
@@ -25359,6 +25379,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
this.model.successCode = key;
if (typeof value === 'object' && typeof value.createJSONSample === 'function') {
this.model.successDescription = value.description;
+ this.model.headers = this.parseResponseHeaders(value.headers);
signatureModel = {
sampleJSON: JSON.stringify(value.createJSONSample(), void 0, 2),
isParam: false,
@@ -25431,6 +25452,26 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
return this;
},
+ parseResponseHeaders: function (data) {
+ var HEADERS_SEPARATOR = '; ';
+ var headers = _.clone(data);
+
+ _.forEach(headers, function (header) {
+ var other = [];
+ _.forEach(header, function (value, key) {
+ var properties = ['type', 'description'];
+ if (properties.indexOf(key.toLowerCase()) === -1) {
+ other.push(key + ': ' + value);
+ }
+ });
+
+ other.join(HEADERS_SEPARATOR);
+ header.other = other;
+ });
+
+ return headers;
+ },
+
addParameter: function(param, consumes) {
// Render a parameter
param.consumes = consumes;
diff --git a/dist/swagger-ui.min.js b/dist/swagger-ui.min.js
index 8a9eed03..d2dbd8f4 100644
--- a/dist/swagger-ui.min.js
+++ b/dist/swagger-ui.min.js
@@ -1,11 +1,11 @@
-(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_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"\n\n"},useData:!0}),this.Handlebars.templates.basic_auth_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return'\n\n\n'},useData:!0}),this.Handlebars.templates.content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression,s=' \n"},4:function(e,t,n,r){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,u=this.escapeExpression,l='\n\n"},useData:!0}),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""===$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),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("_"),r=n+"_content";Docs.expandOperation($("#"+r)),$("#"+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(/