diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/parser/api/Swagger3Parser.java b/backend/services/api-test/src/main/java/io/metersphere/api/parser/api/Swagger3Parser.java index e694dc179d..12e455c55a 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/parser/api/Swagger3Parser.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/parser/api/Swagger3Parser.java @@ -468,6 +468,18 @@ public class Swagger3Parser extends ApiImportAbstractParser properties = modelByRef.getProperties(); + Map jsonSchemaProperties = new LinkedHashMap<>(); + if (MapUtils.isNotEmpty(properties)) { + properties.forEach((key, value) -> { + JsonSchemaItem item = parseProperty(value, false); + jsonSchemaProperties.put(key, item); + }); + } + jsonSchemaItem.setProperties(jsonSchemaProperties); + return jsonSchemaItem; } }