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 319b9215c4..49ab47752d 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 @@ -350,7 +350,9 @@ public class Swagger3Parser extends SwaggerAbstractParser { JsonSchemaItem jsonSchemaItem = parseSchema(schema, refSet); if (jsonSchemaItem == null) { jsonSchemaItem = new JsonSchemaItem(); - jsonSchemaItem.setType(schema.getType()); + if (StringUtils.isNotBlank(schema.getType())) { + jsonSchemaItem.setType(schema.getType()); + } } if (MapUtils.isEmpty(jsonSchemaItem.getProperties())) { jsonSchemaItem.setProperties(new HashMap<>());