diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger3Parser.java b/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger3Parser.java index ab2a9dae91..b18e11394b 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger3Parser.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger3Parser.java @@ -380,7 +380,12 @@ public class Swagger3Parser extends SwaggerAbstractParser { Object propertiesResult = parseSchemaPropertiesToJson(schema, refSet, infoMap); return propertiesResult == null ? getDefaultValueByPropertyType(schema) : propertiesResult; } else { - return getDefaultValueByPropertyType(schema); + if (MapUtils.isNotEmpty(schema.getProperties())) { + Object propertiesResult = parseSchemaPropertiesToJson(schema, refSet, infoMap); + return propertiesResult == null ? getDefaultValueByPropertyType(schema) : propertiesResult; + } else { + return getDefaultValueByPropertyType(schema); + } } }