From 3bf9ee9561ff5d54e7dc6fee6953bc5b94976bd6 Mon Sep 17 00:00:00 2001 From: AgAngle <1323481023@qq.com> Date: Wed, 6 Mar 2024 14:13:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E8=AF=95=E6=8F=92=E4=BB=B6=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/metersphere/api/dto/debug/ApiDebugAddRequest.java | 2 +- .../io/metersphere/api/dto/debug/ApiDebugUpdateRequest.java | 2 +- .../io/metersphere/api/controller/ApiDebugControllerTests.java | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) 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());