Merge remote-tracking branch 'origin/master'

3.x
tanghc 5 years ago
commit e8b251ddb8
  1. 5
      sop-website/src/main/java/com/gitee/sop/websiteserver/manager/SwaggerDocParser.java

@ -208,8 +208,11 @@ public class SwaggerDocParser implements DocParser {
protected List<DocParameter> buildDocParameters(String ref, JSONObject docRoot, boolean doSubRef) { protected List<DocParameter> buildDocParameters(String ref, JSONObject docRoot, boolean doSubRef) {
JSONObject responseObject = docRoot.getJSONObject("definitions").getJSONObject(ref); JSONObject responseObject = docRoot.getJSONObject("definitions").getJSONObject(ref);
JSONObject properties = responseObject.getJSONObject("properties"); JSONObject properties = responseObject.getJSONObject("properties");
Set<String> fieldNames = properties.keySet();
List<DocParameter> docParameterList = new ArrayList<>(); List<DocParameter> docParameterList = new ArrayList<>();
if (properties == null) {
return docParameterList;
}
Set<String> fieldNames = properties.keySet();
for (String fieldName : fieldNames) { for (String fieldName : fieldNames) {
/* /*
{ {

Loading…
Cancel
Save