This commit is contained in:
tanghc
2020-12-24 11:03:19 +08:00
parent db384fe8a0
commit 32425e7903
2 changed files with 31 additions and 4 deletions

View File

@@ -160,8 +160,10 @@ public class SwaggerDocParser implements DocParser {
JSONObject schema = fieldJson.getJSONObject("schema");
if (schema != null) {
RefInfo refInfo = getRefInfo(schema);
List<DocParameter> parameterList = this.buildDocParameters(refInfo.ref, docRoot, true);
docParameterList.addAll(parameterList);
if (refInfo != null) {
List<DocParameter> parameterList = this.buildDocParameters(refInfo.ref, docRoot, true);
docParameterList.addAll(parameterList);
}
} else {
DocParameter docParameter = fieldJson.toJavaObject(DocParameter.class);
docParameterList.add(docParameter);