From 5f4eec1b8a7c49efc0e023976a298c7960b14d31 Mon Sep 17 00:00:00 2001 From: tomrac87 Date: Wed, 28 Aug 2013 15:39:50 +0200 Subject: [PATCH] Added proper formatting for hal+json Content-Type responses --- dist/swagger-ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/swagger-ui.js b/dist/swagger-ui.js index bc16d52f..da762750 100644 --- a/dist/swagger-ui.js +++ b/dist/swagger-ui.js @@ -1673,7 +1673,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; if (content === void 0) { code = $('').text("no content"); pre = $('
').append(code);
-      } else if (contentType.indexOf("application/json") === 0) {
+      } else if (contentType.indexOf("application/json") === 0 || contentType.indexOf("application/hal+json") === 0) {
         code = $('').text(JSON.stringify(JSON.parse(content), null, 2));
         pre = $('
').append(code);
       } else if (contentType.indexOf("application/xml") === 0) {