diff --git a/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger3Parser.java b/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger3Parser.java index 7cda59f94e..a447819020 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger3Parser.java +++ b/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger3Parser.java @@ -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; }