Sfoglia il codice sorgente

undid double stringify

bubble
Tony Tam 10 anni fa
parent
commit
a39ab425bf
3 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  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 Vedi File

@@ -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
File diff soppresso perché troppo grande
Vedi File


+ 1
- 1
src/main/coffeescript/view/OperationView.coffee Vedi File

@@ -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)


Caricamento…
Annulla
Salva