refactor(接口测试): 修复swagger的xml导入导出问题
--bug=1022544 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001022544
This commit is contained in:
parent
f4686e7096
commit
5edc99809f
|
@ -499,11 +499,7 @@ public class Swagger3Parser extends SwaggerAbstractParser {
|
|||
if (ref.split("/").length > 3) {
|
||||
ref = ref.replace("#/components/schemas/", StringUtils.EMPTY);
|
||||
}
|
||||
if (this.components.getSchemas() != null) {
|
||||
Schema schema = this.components.getSchemas().get(ref);
|
||||
schema.setName(ref);
|
||||
return schema;
|
||||
}
|
||||
if (this.components.getSchemas() != null) return this.components.getSchemas().get(ref);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue