修复NPE问题

pull/1/head
tanghc 5 years ago
parent 95c577f2a5
commit 8d63d865f6
  1. 3
      sop-website/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java

@ -35,6 +35,9 @@ public class SwaggerDocParser implements DocParser {
List<DocItem> docItems = new ArrayList<>();
JSONObject paths = docRoot.getJSONObject("paths");
if (paths == null) {
paths = new JSONObject();
}
Set<String> pathNameSet = paths.keySet();
for (String apiPath : pathNameSet) {
JSONObject pathInfo = paths.getJSONObject(apiPath);

Loading…
Cancel
Save