修复文档显示问题

1.x
tanghc 5 years ago
parent b5a06b9faf
commit 0b4e09b0e5
  1. 3
      sop-website/website-server/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java

@ -200,7 +200,7 @@ public class SwaggerDocParser implements DocParser {
} }
protected String getResponseRef(JSONObject docInfo) { protected String getResponseRef(JSONObject docInfo) {
String ref = Optional.ofNullable(docInfo.getJSONObject("responses")) return Optional.ofNullable(docInfo.getJSONObject("responses"))
.flatMap(jsonObject -> Optional.ofNullable(jsonObject.getJSONObject("200"))) .flatMap(jsonObject -> Optional.ofNullable(jsonObject.getJSONObject("200")))
.flatMap(jsonObject -> Optional.ofNullable(jsonObject.getJSONObject("schema"))) .flatMap(jsonObject -> Optional.ofNullable(jsonObject.getJSONObject("schema")))
.flatMap(jsonObject -> { .flatMap(jsonObject -> {
@ -216,7 +216,6 @@ public class SwaggerDocParser implements DocParser {
return Optional.of($ref); return Optional.of($ref);
}) })
.orElse(""); .orElse("");
return ref;
} }
} }

Loading…
Cancel
Save