fix(接口测试): swagger导入报错
--user=郭雨琦 --bug=1016313 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001016313
This commit is contained in:
parent
d635794605
commit
29e0f13a2d
|
@ -534,8 +534,12 @@ public class Swagger3Parser extends SwaggerAbstractParser {
|
|||
Map<String, JsonSchemaItem> JsonSchemaProperties = new LinkedHashMap<>();
|
||||
properties.forEach((key, value) -> {
|
||||
JsonSchemaItem item = new JsonSchemaItem();
|
||||
item.setType(schema.getType());
|
||||
item.setDescription(schema.getDescription());
|
||||
if (StringUtils.isNotBlank(schema.getType())) {
|
||||
item.setType(schema.getType());
|
||||
}
|
||||
if (StringUtils.isNotBlank(schema.getDescription())) {
|
||||
item.setDescription(schema.getDescription());
|
||||
}
|
||||
JsonSchemaItem proItem = parseSchema(value, refSet);
|
||||
if (proItem != null) JsonSchemaProperties.put(key, proItem);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue