fix(接口测试): 解决swagger接口导入丢失数据问题

--user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001016219
This commit is contained in:
guoyuqi 2022-08-24 16:15:25 +08:00 committed by f2c-ci-robot[bot]
parent 04ffade260
commit 36f1b39964
1 changed files with 6 additions and 1 deletions

View File

@ -380,7 +380,12 @@ public class Swagger3Parser extends SwaggerAbstractParser {
Object propertiesResult = parseSchemaPropertiesToJson(schema, refSet, infoMap);
return propertiesResult == null ? getDefaultValueByPropertyType(schema) : propertiesResult;
} else {
return getDefaultValueByPropertyType(schema);
if (MapUtils.isNotEmpty(schema.getProperties())) {
Object propertiesResult = parseSchemaPropertiesToJson(schema, refSet, infoMap);
return propertiesResult == null ? getDefaultValueByPropertyType(schema) : propertiesResult;
} else {
return getDefaultValueByPropertyType(schema);
}
}
}