diff --git a/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger2Parser.java b/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger2Parser.java index 5084926451..6966755940 100644 --- a/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger2Parser.java +++ b/backend/src/main/java/io/metersphere/api/dto/definition/parse/Swagger2Parser.java @@ -294,7 +294,14 @@ public class Swagger2Parser extends SwaggerAbstractParser { propertyList.add(new JSONObject()); } jsonObject.put(key, propertyList); - } else { + } else if (items instanceof ObjectProperty) { + JSONArray propertyList = new JSONArray(); + if (items != null) { + propertyList.add(getBodyParameters(((ObjectProperty) items).getProperties(), refSet)); + } + jsonObject.put(key, propertyList); + } + else { jsonObject.put(key, new ArrayList<>()); } } else if (value instanceof RefProperty) {