diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/debug/ApiDebugAddRequest.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/debug/ApiDebugAddRequest.java index ae2731fba3..16600a442c 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/dto/debug/ApiDebugAddRequest.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/debug/ApiDebugAddRequest.java @@ -33,7 +33,7 @@ public class ApiDebugAddRequest implements Serializable { private String method; @Schema(description = "http协议url/其它协议则为空") - @Size(min = 1, max = 500, message = "{api_debug.protocol.length_range}") + @Size(max = 500, message = "{api_debug.protocol.length_range}") private String path; @Schema(description = "项目fk", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/dto/debug/ApiDebugUpdateRequest.java b/backend/services/api-test/src/main/java/io/metersphere/api/dto/debug/ApiDebugUpdateRequest.java index 21c8169021..4d460671c0 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/dto/debug/ApiDebugUpdateRequest.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/dto/debug/ApiDebugUpdateRequest.java @@ -31,7 +31,7 @@ public class ApiDebugUpdateRequest implements Serializable { private String method; @Schema(description = "http协议路径/其它协议则为空") - @Size(min = 1, max = 500, message = "{api_debug.protocol.length_range}") + @Size(max = 500, message = "{api_debug.protocol.length_range}") private String path; @Schema(description = "模块fk", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiDebugControllerTests.java b/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiDebugControllerTests.java index 33860d3555..68fc182658 100644 --- a/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiDebugControllerTests.java +++ b/backend/services/api-test/src/test/java/io/metersphere/api/controller/ApiDebugControllerTests.java @@ -206,6 +206,7 @@ public class ApiDebugControllerTests extends BaseTest { request.setName("test1"); request.setUploadFileIds(null); request.setLinkFileIds(null); + request.setPath(""); mvcResult = this.requestPostWithOkAndReturn(DEFAULT_ADD, request); resultData = getResultData(mvcResult, ApiDebug.class); this.anotherAddApiDebug = assertUpdateApiDebug(request, msHttpElement, resultData.getId());