fix: swagger2响应解析不完整

This commit is contained in:
chenjianxing 2021-06-24 10:44:52 +08:00 committed by jianxing
parent f72e8dcf62
commit c3f9c1fc00
1 changed files with 8 additions and 1 deletions

View File

@ -294,7 +294,14 @@ public class Swagger2Parser extends SwaggerAbstractParser {
propertyList.add(new JSONObject());
}
jsonObject.put(key, propertyList);
} else {
} else if (items instanceof ObjectProperty) {
JSONArray propertyList = new JSONArray();
if (items != null) {
propertyList.add(getBodyParameters(((ObjectProperty) items).getProperties(), refSet));
}
jsonObject.put(key, propertyList);
}
else {
jsonObject.put(key, new ArrayList<>());
}
} else if (value instanceof RefProperty) {