fix(接口测试): 修复swagger导入失败问题

--user=郭雨琦
This commit is contained in:
guoyuqi 2022-11-28 15:49:45 +08:00 committed by xiaomeinvG
parent 81594428e8
commit 8668715ceb
1 changed files with 3 additions and 1 deletions

View File

@ -350,8 +350,10 @@ public class Swagger3Parser extends SwaggerAbstractParser {
JsonSchemaItem jsonSchemaItem = parseSchema(schema, refSet);
if (jsonSchemaItem == null) {
jsonSchemaItem = new JsonSchemaItem();
if (StringUtils.isNotBlank(schema.getType())) {
jsonSchemaItem.setType(schema.getType());
}
}
if (MapUtils.isEmpty(jsonSchemaItem.getProperties())) {
jsonSchemaItem.setProperties(new HashMap<>());
}