diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index 4937b17b47..a239c5695f 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -1090,6 +1090,16 @@ public class ApiDefinitionService { JsonNode exApiResponse = null; JsonNode apiResponse = null; + + if (StringUtils.isBlank(apiDefinition.getResponse()) && StringUtils.isBlank(existApi.getResponse())) { + return false; + } + if (StringUtils.isBlank(apiDefinition.getResponse()) && StringUtils.isNotBlank(existApi.getResponse())) { + return false; + } + if (StringUtils.isNotBlank(apiDefinition.getResponse()) && StringUtils.isBlank(existApi.getResponse())) { + return false; + } try { exApiResponse = objectMapper.readTree(existApi.getResponse()); apiResponse = objectMapper.readTree(apiDefinition.getResponse());