diff --git a/api-test/backend/src/main/java/io/metersphere/api/exec/generator/JSONSchemaBuilder.java b/api-test/backend/src/main/java/io/metersphere/api/exec/generator/JSONSchemaBuilder.java index e845598ed9..fc0b7c657d 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/exec/generator/JSONSchemaBuilder.java +++ b/api-test/backend/src/main/java/io/metersphere/api/exec/generator/JSONSchemaBuilder.java @@ -116,7 +116,7 @@ public class JSONSchemaBuilder { propertyObjType = object.get(PropertyConstant.TYPE).getAsString(); } if (propertyObjType.equals(PropertyConstant.STRING) || propertyObjType.equals(PropertyConstant.ENUM)) { - concept.put(propertyName, FormatterUtil.getMockValue(object)); + concept.put(propertyName, object.has(PropertyConstant.MOCK) ? FormatterUtil.getMockValue(object) : StringUtils.EMPTY); } else if (propertyObjType.equals(PropertyConstant.INTEGER) || propertyObjType.equals(PropertyConstant.NUMBER)) { try { concept.put(propertyName, 0);