refactor(接口测试): 修复swagger的xml导入导出问题

--bug=1022544 --user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001022544
This commit is contained in:
guoyuqi 2023-02-13 17:34:02 +08:00 committed by fit2-zhao
parent f4686e7096
commit 5edc99809f
1 changed files with 1 additions and 5 deletions

View File

@ -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;
}