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