diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/ShareTicketApi.java b/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/ShareTicketApi.java index f8a8959502..61ff7b2ef9 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/ShareTicketApi.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/ShareTicketApi.java @@ -4,6 +4,9 @@ import io.dataease.api.xpack.share.request.TicketCreator; import io.dataease.api.xpack.share.request.TicketDelRequest; import io.dataease.api.xpack.share.request.TicketSwitchRequest; import io.dataease.api.xpack.share.vo.TicketVO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -12,18 +15,23 @@ import org.springframework.web.bind.annotation.RequestBody; import java.util.List; -@Tag(name = "分享:TICKET") +@Tag(name = "可视化管理:分享:TICKET") public interface ShareTicketApi { @PostMapping("/saveTicket") + @Operation(summary = "保存Ticket") String saveTicket(@RequestBody TicketCreator creator); @PostMapping("/delTicket") + @Operation(summary = "删除Ticket") void deleteTicket(@RequestBody TicketDelRequest request); @PostMapping("/enableTicket") + @Operation(summary = "切换Ticket必填状态") void switchRequire(@RequestBody TicketSwitchRequest request); @GetMapping("/query/{resourceId}") + @Operation(summary = "根据资源查询Ticket") + @Parameter(name = "resourceId", description = "资源ID", required = true, in = ParameterIn.PATH) List query(@PathVariable("resourceId") Long resourceId); } diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/XpackShareApi.java b/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/XpackShareApi.java index 4e82e825c1..a3ec2a2fab 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/XpackShareApi.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/XpackShareApi.java @@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RequestBody; import java.util.List; import java.util.Map; -@Tag(name = "分享") +@Tag(name = "可视化管理:分享") public interface XpackShareApi { @Operation(summary = "查询资源分享状态") diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/request/TicketCreator.java b/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/request/TicketCreator.java index 1cb9250e93..06d0739cb2 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/request/TicketCreator.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/request/TicketCreator.java @@ -1,22 +1,25 @@ package io.dataease.api.xpack.share.request; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.io.Serial; import java.io.Serializable; +@Schema(description = "分享Ticket") @Data public class TicketCreator implements Serializable { @Serial private static final long serialVersionUID = 8661378104009097296L; + @Schema(description = "Ticket", requiredMode = Schema.RequiredMode.REQUIRED) private String ticket; - + @Schema(description = "有效期", requiredMode = Schema.RequiredMode.REQUIRED) private Long exp; - + @Schema(description = "参数") private String args; - + @Schema(description = "分享链接UUID", requiredMode = Schema.RequiredMode.REQUIRED) private String uuid; - + @Schema(description = "刷新Ticket") private boolean generateNew; } diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/request/TicketDelRequest.java b/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/request/TicketDelRequest.java index f302d53c8e..159ac4a873 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/request/TicketDelRequest.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/request/TicketDelRequest.java @@ -1,14 +1,15 @@ package io.dataease.api.xpack.share.request; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.io.Serial; import java.io.Serializable; - +@Schema(description = "删除Ticket") @Data public class TicketDelRequest implements Serializable { @Serial private static final long serialVersionUID = -3978489349675065507L; - + @Schema(description = "Ticket", requiredMode = Schema.RequiredMode.REQUIRED) private String ticket; } diff --git a/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/request/TicketSwitchRequest.java b/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/request/TicketSwitchRequest.java index dd0c376c93..25b2089547 100644 --- a/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/request/TicketSwitchRequest.java +++ b/sdk/api/api-base/src/main/java/io/dataease/api/xpack/share/request/TicketSwitchRequest.java @@ -1,16 +1,17 @@ package io.dataease.api.xpack.share.request; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.io.Serial; import java.io.Serializable; - +@Schema(description = "切换器") @Data public class TicketSwitchRequest implements Serializable { @Serial private static final long serialVersionUID = 7670768142874123370L; - + @Schema(description = "资源ID", requiredMode = Schema.RequiredMode.REQUIRED) private String resourceId; - + @Schema(description = "是否必填", requiredMode = Schema.RequiredMode.REQUIRED) private Boolean require = false; } diff --git a/sdk/common/src/main/java/io/dataease/doc/SwaggerConfig.java b/sdk/common/src/main/java/io/dataease/doc/SwaggerConfig.java index 3ec4390be3..e123c513d0 100644 --- a/sdk/common/src/main/java/io/dataease/doc/SwaggerConfig.java +++ b/sdk/common/src/main/java/io/dataease/doc/SwaggerConfig.java @@ -50,7 +50,7 @@ public class SwaggerConfig { @Bean public GroupedOpenApi visualizationApi() { - return GroupedOpenApi.builder().group("1-visualization").displayName("可视化管理").packagesToScan("io.dataease.visualization").build(); + return GroupedOpenApi.builder().group("1-visualization").displayName("可视化管理").packagesToScan("io.dataease.visualization", "io.dataease.share").build(); } @Bean