Added proper formatting for hal+json Content-Type responses

This commit is contained in:
tomrac87
2013-08-28 15:39:50 +02:00
parent f22efb66de
commit 5f4eec1b8a

2
dist/swagger-ui.js vendored
View File

@@ -1673,7 +1673,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
if (content === void 0) {
code = $('<code />').text("no content");
pre = $('<pre class="json" />').append(code);
} else if (contentType.indexOf("application/json") === 0) {
} else if (contentType.indexOf("application/json") === 0 || contentType.indexOf("application/hal+json") === 0) {
code = $('<code />').text(JSON.stringify(JSON.parse(content), null, 2));
pre = $('<pre class="json" />').append(code);
} else if (contentType.indexOf("application/xml") === 0) {