fix(接口测试): 解决swagger导入报类型转换问题

--user=郭雨琦
This commit is contained in:
guoyuqi 2022-04-06 11:33:50 +08:00 committed by 刘瑞斌
parent 0fbdc32ef2
commit 840f7c5b99
1 changed files with 2 additions and 2 deletions

View File

@ -293,8 +293,8 @@ public class Swagger2Parser extends SwaggerAbstractParser {
ArrayModel arrayModel = (ArrayModel) schema;
item.setType("array");
item.setItems(new ArrayList<>());
JsonSchemaItem arrayItem = parseJsonSchema((Model) arrayModel.getItems(), refSet);
if (arrayItem != null) item.getItems().add(arrayItem);
JsonSchemaItem proItem = parseProperty(arrayModel.getItems(), refSet);
if (proItem != null) item.getItems().add(proItem);
} else if (schema instanceof ModelImpl) {
item.setType("object");
ModelImpl model = (ModelImpl) schema;