docs: 完善公共模块相关接口文档信息

This commit is contained in:
2023-08-15 00:23:58 +08:00
parent 90af86a04b
commit 190385ed36
7 changed files with 15 additions and 15 deletions

View File

@@ -46,7 +46,7 @@ public class SortQuery implements Serializable {
/**
* 排序条件
*/
@Schema(description = "排序条件", example = "sort=published,desc&sort=title,asc")
@Schema(description = "排序条件", example = "createTime,desc")
private String[] sort;
/**
@@ -61,7 +61,7 @@ public class SortQuery implements Serializable {
List<Sort.Order> orders = new ArrayList<>(sort.length);
if (StrUtil.contains(sort[0], StringConsts.COMMA)) {
// e.g "sort=published,desc&sort=title,asc"
// e.g "sort=createTime,desc&sort=name,asc"
for (String s : sort) {
List<String> sortList = StrUtil.splitTrim(s, StringConsts.COMMA);
Sort.Order order =
@@ -69,7 +69,7 @@ public class SortQuery implements Serializable {
orders.add(order);
}
} else {
// e.g "sort=published,desc"
// e.g "sort=createTime,desc"
Sort.Order order = new Sort.Order(Sort.Direction.valueOf(sort[1].toUpperCase()), sort[0]);
orders.add(order);
}

View File

@@ -41,7 +41,7 @@ public class UpdateStatusRequest implements Serializable {
/**
* 状态1启用 2禁用
*/
@Schema(description = "状态1启用 2禁用", type = "Integer", allowableValues = {"1", "2"})
@Schema(description = "状态1启用 2禁用", type = "Integer", allowableValues = {"1", "2"}, example = "1")
@NotNull(message = "状态非法")
private DisEnableStatusEnum status;
}

View File

@@ -39,12 +39,13 @@ public class CaptchaVO implements Serializable {
/**
* 验证码标识
*/
@Schema(description = "验证码标识")
@Schema(description = "验证码标识", example = "8a5a0296acd141a8b1bd789da867bc1a")
private String uuid;
/**
* 验证码图片Base64编码带图片格式data:image/gif;base64
*/
@Schema(description = "验证码图片Base64编码带图片格式data:image/gif;base64")
@Schema(description = "验证码图片Base64编码带图片格式data:image/gif;base64",
example = "data:image/png;base64,iVBORw0KGgoAAAAN...")
private String img;
}

View File

@@ -40,13 +40,13 @@ public class LabelValueVO<V> implements Serializable {
/**
* 标签
*/
@Schema(description = "标签")
@Schema(description = "标签", example = "")
private String label;
/**
* 值
*/
@Schema(description = "")
@Schema(description = "", example = "1")
private V value;
public LabelValueVO(String label, V value) {