diff --git a/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger2Parser.java b/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger2Parser.java index cdcf7010a8..cc06cb2f09 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger2Parser.java +++ b/api-test/backend/src/main/java/io/metersphere/api/parse/api/Swagger2Parser.java @@ -673,6 +673,8 @@ public class Swagger2Parser extends SwaggerAbstractParser { if (model != null && properties != null) { JSONObject bodyParameters = getBodyParameters(properties, new HashSet<>()); return bodyParameters.toString(); + } else { + return model.getDefaultValue() == null ? StringUtils.EMPTY : model.getDefaultValue().toString(); } } return StringUtils.EMPTY;