瀏覽代碼

undid double stringify

bubble
Tony Tam 10 年之前
父節點
當前提交
a39ab425bf
共有 3 個檔案被更改,包括 3 行新增3 行删除
  1. +1
    -1
      dist/swagger-ui.js
  2. +1
    -1
      dist/swagger-ui.min.js
  3. +1
    -1
      src/main/coffeescript/view/OperationView.coffee

+ 1
- 1
dist/swagger-ui.js 查看文件

@@ -2096,7 +2096,7 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
} else if (contentType === "application/json" || /\+json$/.test(contentType)) {
json = null;
try {
json = JSON.stringify(JSON.stringify(JSON.parse(content), null, " "));
json = JSON.stringify(JSON.parse(content), null, " ");
} catch (_error) {
e = _error;
json = "can't parse JSON. Raw result:\n\n" + content;


+ 1
- 1
dist/swagger-ui.min.js
文件差異過大導致無法顯示
查看文件


+ 1
- 1
src/main/coffeescript/view/OperationView.coffee 查看文件

@@ -368,7 +368,7 @@ class OperationView extends Backbone.View
else if contentType is "application/json" || /\+json$/.test(contentType)
json = null
try
json = JSON.stringify(JSON.stringify(JSON.parse(content), null, " "))
json = JSON.stringify(JSON.parse(content), null, " ")
catch e
json = "can't parse JSON. Raw result:\n\n" + content
code = $('<code />').text(json)


Loading…
取消
儲存