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) {
|
if (ref.split("/").length > 3) {
|
||||||
ref = ref.replace("#/components/schemas/", StringUtils.EMPTY);
|
ref = ref.replace("#/components/schemas/", StringUtils.EMPTY);
|
||||||
}
|
}
|
||||||
if (this.components.getSchemas() != null) {
|
if (this.components.getSchemas() != null) return this.components.getSchemas().get(ref);
|
||||||
Schema schema = this.components.getSchemas().get(ref);
|
|
||||||
schema.setName(ref);
|
|
||||||
return schema;
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue