forked from github/dataease
Merge pull request #12086 from dataease/pr@dev-v2@feat_share_api_doc
feat(仪表板): 增加分享相关api接口文档 #11855
This commit is contained in:
commit
48408cd53f
@ -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<TicketVO> query(@PathVariable("resourceId") Long resourceId);
|
||||
}
|
||||
|
@ -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 = "查询资源分享状态")
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user