fix(接口测试): 解决swagger接口导入丢失数据问题
--user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001016219
This commit is contained in:
parent
04ffade260
commit
36f1b39964
|
@ -379,10 +379,15 @@ public class Swagger3Parser extends SwaggerAbstractParser {
|
|||
} else if (schema instanceof ObjectSchema) {
|
||||
Object propertiesResult = parseSchemaPropertiesToJson(schema, refSet, infoMap);
|
||||
return propertiesResult == null ? getDefaultValueByPropertyType(schema) : propertiesResult;
|
||||
} else {
|
||||
if (MapUtils.isNotEmpty(schema.getProperties())) {
|
||||
Object propertiesResult = parseSchemaPropertiesToJson(schema, refSet, infoMap);
|
||||
return propertiesResult == null ? getDefaultValueByPropertyType(schema) : propertiesResult;
|
||||
} else {
|
||||
return getDefaultValueByPropertyType(schema);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Object parseSchemaPropertiesToJson(Schema schema, Set<String> refSet, Map<String, Schema> infoMap) {
|
||||
if (schema == null) return null;
|
||||
|
|
Loading…
Reference in New Issue