diff --git a/dist/swagger-ui.js b/dist/swagger-ui.js index 3fd0efda..a76a6d96 100644 --- a/dist/swagger-ui.js +++ b/dist/swagger-ui.js @@ -543,7 +543,7 @@ this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function },"18":function(depth0,helpers,partials,data) { return "

Parameters

\n \n \n \n \n \n \n \n \n \n \n \n\n \n
ParameterValueDescriptionParameter TypeData Type
\n"; },"20":function(depth0,helpers,partials,data) { - return "
\n

Response Messages

\n \n \n \n \n \n \n \n \n \n \n \n
HTTP Status CodeReasonResponse Model
\n"; + return "
\n

Response Messages

\n \n \n \n \n \n \n \n \n \n \n\n \n
HTTP Status CodeReasonResponse ModelHeaders
\n"; },"22":function(depth0,helpers,partials,data) { return ""; },"24":function(depth0,helpers,partials,data) { @@ -960,13 +960,25 @@ this["Handlebars"]["templates"]["signature"] = Handlebars.template({"compiler":[ + 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))) + "\n \n \n\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({"1":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 \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"; 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; } - return buffer + "\n"; + buffer += "\n\n\n \n \n"; + stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.headers : depth0), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}); + if (stack1 != null) { buffer += stack1; } + return buffer + " \n
\n"; },"useData":true}); var ApiKeyButton, extend = 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; }, @@ -1822,7 +1834,7 @@ OperationView = (function(superClass) { }; OperationView.prototype.showStatus = function(response) { - var code, content, contentType, e, headers, json, opts, pre, response_body, response_body_el, url; + var code, content, contentType, e, headers, json, opts, pre, response_body, response_body_el, supportsAudioPlayback, url; if (response.content === void 0) { content = response.data; url = response.url; @@ -1840,6 +1852,11 @@ OperationView = (function(superClass) { } $(".response_body", $(this.el)).removeClass('json'); $(".response_body", $(this.el)).removeClass('xml'); + supportsAudioPlayback = function(contentType) { + var audioElement; + audioElement = document.createElement('audio'); + return !!(audioElement.canPlayType && audioElement.canPlayType(contentType).replace(/no/, '')); + }; if (!content) { code = $('').text("no content"); pre = $('
').append(code);
@@ -1861,6 +1878,8 @@ OperationView = (function(superClass) {
       pre = $('
').append(code);
     } else if (/^image\//.test(contentType)) {
       pre = $('').attr('src', url);
+    } else if (/^audio\//.test(contentType) && supportsAudioPlayback(contentType)) {
+      pre = $('