feat: 修改剩余部分 swagger 注解

This commit is contained in:
gaibu
2023-02-04 23:59:25 +08:00
parent 6f3e026f4c
commit 8986299fea
115 changed files with 367 additions and 392 deletions

View File

@@ -12,10 +12,10 @@ import java.util.List;
@Data
public class CodegenDetailRespVO {
@ApiModelProperty("表定义")
@Schema(description = "表定义")
private CodegenTableRespVO table;
@ApiModelProperty("字段定义")
@Schema(description = "字段定义")
private List<CodegenColumnRespVO> columns;
}

View File

@@ -4,7 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = value = "管理后台 - 代码生成预览 Response VO", description ="注意,每个文件都是一个该对象")
@Schema(description = "管理后台 - 代码生成预览 Response VO注意,每个文件都是一个该对象")
@Data
public class CodegenPreviewRespVO {

View File

@@ -70,7 +70,7 @@ public class CodegenColumnBaseVO {
@NotNull(message = "是否为 List 查询操作的字段不能为空")
private Boolean listOperation;
@Schema(description = "List 查询操作的条件类型", required = true, example = "LIKE", notes = "参见 CodegenColumnListConditionEnum 枚举")
@Schema(description = "List 查询操作的条件类型,参见 CodegenColumnListConditionEnum 枚举", required = true, example = "LIKE")
@NotNull(message = "List 查询操作的条件类型不能为空")
private String listOperationCondition;

View File

@@ -12,7 +12,7 @@ import javax.validation.constraints.NotNull;
@Data
public class CodegenTableBaseVO {
@Schema(description = "生成场景", required = true, example = "1", notes = "参见 CodegenSceneEnum 枚举")
@Schema(description = "生成场景,参见 CodegenSceneEnum 枚举", required = true, example = "1")
@NotNull(message = "导入类型不能为空")
private Integer scene;
@@ -47,7 +47,7 @@ public class CodegenTableBaseVO {
@NotNull(message = "作者不能为空")
private String author;
@Schema(description = "模板类型", required = true, example = "1", notes = "参见 CodegenTemplateTypeEnum 枚举")
@Schema(description = "模板类型,参见 CodegenTemplateTypeEnum 枚举", required = true, example = "1")
@NotNull(message = "模板类型不能为空")
private Integer templateType;

View File

@@ -18,10 +18,10 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@ToString(callSuper = true)
public class CodegenTablePageReqVO extends PageParam {
@Schema(description = "表名称", example = "yudao", notes = "模糊匹配")
@Schema(description = "表名称,模糊匹配", example = "yudao")
private String tableName;
@Schema(description = "表描述", example = "芋道", notes = "模糊匹配")
@Schema(description = "表描述,模糊匹配", example = "芋道")
private String tableComment;
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")

View File

@@ -16,10 +16,10 @@ public class ConfigExportReqVO {
@Schema(description = "参数名称", example = "模糊匹配")
private String name;
@Schema(description = "参数键名", example = "yunai.db.username", notes = "模糊匹配")
@Schema(description = "参数键名,模糊匹配", example = "yunai.db.username")
private String key;
@Schema(description = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举")
@Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", example = "1")
private Integer type;
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")

View File

@@ -21,10 +21,10 @@ public class ConfigPageReqVO extends PageParam {
@Schema(description = "数据源名称", example = "模糊匹配")
private String name;
@Schema(description = "参数键名", example = "yunai.db.username", notes = "模糊匹配")
@Schema(description = "参数键名,模糊匹配", example = "yunai.db.username")
private String key;
@Schema(description = "参数类型", example = "1", notes = "参见 SysConfigTypeEnum 枚举")
@Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", example = "1")
private Integer type;
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00,2022-07-01 23:59:59]")

View File

@@ -22,7 +22,7 @@ public class ConfigRespVO extends ConfigBaseVO {
@Size(max = 100, message = "参数键名长度不能超过100个字符")
private String key;
@Schema(description = "参数类型", required = true, example = "1", notes = "参见 SysConfigTypeEnum 枚举")
@Schema(description = "参数类型,参见 SysConfigTypeEnum 枚举", required = true, example = "1")
private Integer type;
@Schema(description = "创建时间", required = true, example = "时间戳格式")

View File

@@ -43,8 +43,7 @@ public class DatabaseDocController {
@GetMapping("/export-html")
@Operation(summary = "导出 html 格式的数据文档")
@Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true",
dataTypeClass = Boolean.class)
@Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true")
public void exportHtml(@RequestParam(defaultValue = "true") Boolean deleteFile,
HttpServletResponse response) throws IOException {
doExportFile(EngineFileType.HTML, deleteFile, response);
@@ -52,8 +51,7 @@ public class DatabaseDocController {
@GetMapping("/export-word")
@Operation(summary = "导出 word 格式的数据文档")
@Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true",
dataTypeClass = Boolean.class)
@Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true")
public void exportWord(@RequestParam(defaultValue = "true") Boolean deleteFile,
HttpServletResponse response) throws IOException {
doExportFile(EngineFileType.WORD, deleteFile, response);
@@ -61,8 +59,7 @@ public class DatabaseDocController {
@GetMapping("/export-markdown")
@Operation(summary = "导出 markdown 格式的数据文档")
@Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true",
dataTypeClass = Boolean.class)
@Parameter(name = "deleteFile", description = "是否删除在服务器本地生成的数据库文档", example = "true")
public void exportMarkdown(@RequestParam(defaultValue = "true") Boolean deleteFile,
HttpServletResponse response) throws IOException {
doExportFile(EngineFileType.MD, deleteFile, response);

View File

@@ -1,8 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.db.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
/**

View File

@@ -1,8 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.db.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 数据源配置创建 Request VO")

View File

@@ -1,10 +1,9 @@
package cn.iocoder.yudao.module.infra.controller.admin.db.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
import java.util.*;
import io.swagger.annotations.*;
@Schema(description = "管理后台 - 数据源配置 Response VO")
@Data

View File

@@ -1,8 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.db.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 数据源配置更新 Request VO")

View File

@@ -15,11 +15,11 @@ import java.util.Map;
@ToString(callSuper = true)
public class FileConfigCreateReqVO extends FileConfigBaseVO {
@Schema(description = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类")
@Schema(description = "存储器,参见 FileStorageEnum 枚举类", required = true, example = "1")
@NotNull(message = "存储器不能为空")
private Integer storage;
@Schema(description = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收")
@Schema(description = "存储配置,配置是动态参数,所以使用 Map 接收", required = true)
@NotNull(message = "存储配置不能为空")
private Map<String, Object> config;

View File

@@ -19,7 +19,7 @@ public class FileConfigRespVO extends FileConfigBaseVO {
@Schema(description = "编号", required = true, example = "1")
private Long id;
@Schema(description = "存储器", required = true, example = "1", notes = "参见 FileStorageEnum 枚举类")
@Schema(description = "存储器,参见 FileStorageEnum 枚举类", required = true, example = "1")
@NotNull(message = "存储器不能为空")
private Integer storage;

View File

@@ -19,7 +19,7 @@ public class FileConfigUpdateReqVO extends FileConfigBaseVO {
@NotNull(message = "编号不能为空")
private Long id;
@Schema(description = "存储配置", required = true, notes = "配置是动态参数,所以使用 Map 接收")
@Schema(description = "存储配置,配置是动态参数,所以使用 Map 接收", required = true)
@NotNull(message = "存储配置不能为空")
private Map<String, Object> config;

View File

@@ -18,10 +18,10 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@ToString(callSuper = true)
public class FilePageReqVO extends PageParam {
@Schema(description = "文件路径", example = "yudao", notes = "模糊匹配")
@Schema(description = "文件路径,模糊匹配", example = "yudao")
private String path;
@Schema(description = "文件类型", example = "jpg", notes = "模糊匹配")
@Schema(description = "文件类型,模糊匹配", example = "jpg")
private String type;
@Schema(description = "创建时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")

View File

@@ -6,7 +6,7 @@ import lombok.Data;
import java.time.LocalDateTime;
@Schema(description = value = "管理后台 - 文件 Response VO", description = "不返回 content 字段,太大")
@Schema(description = "管理后台 - 文件 Response VO,不返回 content 字段,太大" )
@Data
public class FileRespVO {

View File

@@ -7,7 +7,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotNull;
@Schema(description = value = "管理后台 - 上传文件 Request VO")
@Schema(description = "管理后台 - 上传文件 Request VO")
@Data
public class FileUploadReqVO {

View File

@@ -24,7 +24,7 @@ public class ApiAccessLogBaseVO {
@NotNull(message = "用户编号不能为空")
private Long userId;
@Schema(description = "用户类型", required = true, example = "2", notes = "参见 UserTypeEnum 枚举")
@Schema(description = "用户类型,参见 UserTypeEnum 枚举", required = true, example = "2")
@NotNull(message = "用户类型不能为空")
private Integer userType;

View File

@@ -9,7 +9,7 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = value = "管理后台 - API 访问日志 Excel 导出 Request VO", description = "参数和 ApiAccessLogPageReqVO 是一致的")
@Schema(description = "管理后台 - API 访问日志 Excel 导出 Request VO,参数和 ApiAccessLogPageReqVO 是一致的")
@Data
public class ApiAccessLogExportReqVO {
@@ -22,14 +22,14 @@ public class ApiAccessLogExportReqVO {
@Schema(description = "应用名", example = "dashboard")
private String applicationName;
@Schema(description = "请求地址", example = "/xxx/yyy", notes = "模糊匹配")
@Schema(description = "请求地址,模糊匹配", example = "/xxx/yyy")
private String requestUrl;
@Schema(description = "开始时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] beginTime;
@Schema(description = "执行时长", example = "100", notes = "大于等于,单位:毫秒")
@Schema(description = "执行时长,大于等于,单位:毫秒", example = "100")
private Integer duration;
@Schema(description = "结果码", example = "0")

View File

@@ -27,14 +27,14 @@ public class ApiAccessLogPageReqVO extends PageParam {
@Schema(description = "应用名", example = "dashboard")
private String applicationName;
@Schema(description = "请求地址", example = "/xxx/yyy", notes = "模糊匹配")
@Schema(description = "请求地址,模糊匹配", example = "/xxx/yyy")
private String requestUrl;
@Schema(description = "开始时间", example = "[2022-07-01 00:00:00, 2022-07-01 23:59:59]")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] beginTime;
@Schema(description = "执行时长", example = "100", notes = "大于等于,单位:毫秒")
@Schema(description = "执行时长,大于等于,单位:毫秒", example = "100")
private Integer duration;
@Schema(description = "结果码", example = "0")

View File

@@ -9,7 +9,7 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = value = "管理后台 - API 错误日志 Excel 导出 Request VO", description = "参数和 ApiErrorLogPageReqVO 是一致的")
@Schema(description = "管理后台 - API 错误日志 Excel 导出 Request VO,参数和 ApiErrorLogPageReqVO 是一致的")
@Data
public class ApiErrorLogExportReqVO {

View File

@@ -13,7 +13,7 @@ public class RedisKeyValueRespVO {
@Schema(description = "c5f6990767804a928f4bb96ca249febf", required = true, example = "String")
private String key;
@ApiModelProperty(required = true, example = "String")
@Schema(required = true, example = "String")
private String value;
}

View File

@@ -15,7 +15,7 @@ import java.util.Properties;
@AllArgsConstructor
public class RedisMonitorRespVO {
@Schema(description = "Redis info 指令结果", required = true, notes = "具体字段,查看 Redis 文档")
@Schema(description = "Redis info 指令结果,具体字段,查看 Redis 文档", required = true)
private Properties info;
@Schema(description = "Redis key 数量", required = true, example = "1024")

View File

@@ -69,7 +69,7 @@ public class TestDemoController {
@GetMapping("/list")
@Operation(summary = "获得字典类型列表")
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
@PreAuthorize("@ss.hasPermission('infra:test-demo:query')")
public CommonResult<List<TestDemoRespVO>> getTestDemoList(@RequestParam("ids") Collection<Long> ids) {
List<TestDemoDO> list = testDemoService.getTestDemoList(ids);

View File

@@ -1,8 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.test.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
/**

View File

@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.test.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import io.swagger.annotations.*;
@Schema(description = "管理后台 - 字典类型创建 Request VO")
@Data

View File

@@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.test.vo;
import lombok.*;
import java.time.LocalDateTime;
import java.util.*;
import io.swagger.annotations.*;
import com.alibaba.excel.annotation.ExcelProperty;

View File

@@ -9,7 +9,7 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = value = "管理后台 - 字典类型 Excel 导出 Request VO", description = "参数和 TestDemoPageReqVO 是一致的")
@Schema(description = "管理后台 - 字典类型 Excel 导出 Request VO,参数和 TestDemoPageReqVO 是一致的")
@Data
public class TestDemoExportReqVO {

View File

@@ -1,7 +1,7 @@
package cn.iocoder.yudao.module.infra.controller.admin.test.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 字典类型更新 Request VO")