From baa0eb545fc5c04acb53377edaa6e1d23ce8de80 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Fri, 2 Jun 2023 16:49:01 +0800 Subject: [PATCH] ci: ui generator config --- .../app/src/main/resources/commons.properties | 1 - backend/framework/domain/pom.xml | 8 +- .../ui/domain/UiCustomCommandBlob.java | 2 +- .../ui/domain/UiCustomCommandModule.java | 2 +- .../ui/domain/UiScenarioFollower.java | 10 +-- .../src/main/resources/uiGeneratorConfig.xml | 90 +++++++++++++++++++ 6 files changed, 101 insertions(+), 12 deletions(-) create mode 100644 backend/framework/domain/src/main/resources/uiGeneratorConfig.xml diff --git a/backend/app/src/main/resources/commons.properties b/backend/app/src/main/resources/commons.properties index 6bbfbd0907..9bd228dbc3 100644 --- a/backend/app/src/main/resources/commons.properties +++ b/backend/app/src/main/resources/commons.properties @@ -1,7 +1,6 @@ spring.application.name=metersphere management.server.port=7071 server.port=8081 -server.servlet.context-path=/backend # gzip server.compression.enabled=true server.compression.mime-types=application/json,application/xml,text/html,text/xml,text/plain,application/javascript,text/css,text/javascript,image/jpeg diff --git a/backend/framework/domain/pom.xml b/backend/framework/domain/pom.xml index 3ad4ca8180..d805c6b74a 100644 --- a/backend/framework/domain/pom.xml +++ b/backend/framework/domain/pom.xml @@ -49,9 +49,11 @@ src/main/resources/loadGeneratorConfig.xml src/main/resources/sdkGeneratorConfig.xml src/main/resources/projectGeneratorConfig.xml - - - + src/main/resources/systemGeneratorConfig.xml + src/main/resources/uiGeneratorConfig.xml + src/main/resources/bugGeneratorConfig.xml + src/main/resources/apiGeneratorConfig.xml + src/main/resources/functionalGeneratorConfig.xml diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandBlob.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandBlob.java index 90c20839c3..9e8a111e0e 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandBlob.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandBlob.java @@ -8,7 +8,7 @@ import lombok.Data; @Data public class UiCustomCommandBlob implements Serializable { - @Schema(title = "场景ID", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(title = "指令ID", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{ui_custom_command_blob.id.not_blank}", groups = {Updated.class}) @Size(min = 1, max = 50, message = "{ui_custom_command_blob.id.length_range}", groups = {Created.class, Updated.class}) private String id; diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandModule.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandModule.java index e29492b9a7..49deebb886 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandModule.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiCustomCommandModule.java @@ -20,7 +20,7 @@ public class UiCustomCommandModule implements Serializable { @Schema(title = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{ui_custom_command_module.name.not_blank}", groups = {Created.class}) - @Size(min = 1, max = 64, message = "{ui_custom_command_module.name.length_range}", groups = {Created.class, Updated.class}) + @Size(min = 1, max = 255, message = "{ui_custom_command_module.name.length_range}", groups = {Created.class, Updated.class}) private String name; @Schema(title = "父级ID", requiredMode = Schema.RequiredMode.REQUIRED) diff --git a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioFollower.java b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioFollower.java index 9c618e58d8..e626b2f1a8 100644 --- a/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioFollower.java +++ b/backend/framework/domain/src/main/java/io/metersphere/ui/domain/UiScenarioFollower.java @@ -1,22 +1,20 @@ package io.metersphere.ui.domain; -import io.metersphere.validation.groups.Created; -import io.metersphere.validation.groups.Updated; +import io.metersphere.validation.groups.*; import io.swagger.v3.oas.annotations.media.Schema; -import jakarta.validation.constraints.NotBlank; -import jakarta.validation.constraints.Size; +import jakarta.validation.constraints.*; import java.io.Serializable; import lombok.Data; @Data public class UiScenarioFollower implements Serializable { @Schema(title = "场景ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{ui_scenario_follower.scenario_id.not_blank}", groups = {Updated.class}) + @NotBlank(message = "{ui_scenario_follower.scenario_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{ui_scenario_follower.scenario_id.length_range}", groups = {Created.class, Updated.class}) private String scenarioId; @Schema(title = "关注人ID", requiredMode = Schema.RequiredMode.REQUIRED) - @NotBlank(message = "{ui_scenario_follower.user_id.not_blank}", groups = {Updated.class}) + @NotBlank(message = "{ui_scenario_follower.user_id.not_blank}", groups = {Created.class}) @Size(min = 1, max = 50, message = "{ui_scenario_follower.user_id.length_range}", groups = {Created.class, Updated.class}) private String userId; diff --git a/backend/framework/domain/src/main/resources/uiGeneratorConfig.xml b/backend/framework/domain/src/main/resources/uiGeneratorConfig.xml new file mode 100644 index 0000000000..1e50872504 --- /dev/null +++ b/backend/framework/domain/src/main/resources/uiGeneratorConfig.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + +