Optimize: parameters - optimize verification #18
@@ -8,7 +8,6 @@ import top.fatweb.oxygen.api.annotation.BaseController
|
|||||||
import top.fatweb.oxygen.api.annotation.Trim
|
import top.fatweb.oxygen.api.annotation.Trim
|
||||||
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
import top.fatweb.oxygen.api.entity.common.ResponseCode
|
||||||
import top.fatweb.oxygen.api.entity.common.ResponseResult
|
import top.fatweb.oxygen.api.entity.common.ResponseResult
|
||||||
import top.fatweb.oxygen.api.param.PageSortParam
|
|
||||||
import top.fatweb.oxygen.api.param.tool.ToolBaseAddParam
|
import top.fatweb.oxygen.api.param.tool.ToolBaseAddParam
|
||||||
import top.fatweb.oxygen.api.param.tool.ToolBaseGetParam
|
import top.fatweb.oxygen.api.param.tool.ToolBaseGetParam
|
||||||
import top.fatweb.oxygen.api.param.tool.ToolBaseUpdateParam
|
import top.fatweb.oxygen.api.param.tool.ToolBaseUpdateParam
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package top.fatweb.oxygen.api.controller.tool
|
|||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation
|
import io.swagger.v3.oas.annotations.Operation
|
||||||
import jakarta.validation.Valid
|
import jakarta.validation.Valid
|
||||||
import jakarta.validation.constraints.NotNull
|
|
||||||
import org.springframework.web.bind.annotation.*
|
import org.springframework.web.bind.annotation.*
|
||||||
import top.fatweb.oxygen.api.annotation.BaseController
|
import top.fatweb.oxygen.api.annotation.BaseController
|
||||||
import top.fatweb.oxygen.api.annotation.Trim
|
import top.fatweb.oxygen.api.annotation.Trim
|
||||||
|
|||||||
@@ -49,6 +49,6 @@ data class RegisterParam(
|
|||||||
*/
|
*/
|
||||||
@Schema(description = "密码", required = true)
|
@Schema(description = "密码", required = true)
|
||||||
@field:NotBlank(message = "Password can not be blank")
|
@field:NotBlank(message = "Password can not be blank")
|
||||||
@field:Size(min = 10, max = 30, message = "Password must be 10-20 characters")
|
@field:Size(min = 10, max = 30, message = "Password must be 10-30 characters")
|
||||||
val password: String?
|
val password: String?
|
||||||
) : CaptchaCodeParam()
|
) : CaptchaCodeParam()
|
||||||
@@ -32,6 +32,6 @@ data class RetrieveParam(
|
|||||||
*/
|
*/
|
||||||
@Schema(description = "新密码")
|
@Schema(description = "新密码")
|
||||||
@field:NotBlank(message = "New password can not be blank")
|
@field:NotBlank(message = "New password can not be blank")
|
||||||
@field:Size(min = 10, max = 30)
|
@field:Size(min = 10, max = 30, message = "New password must be 10-30 characters")
|
||||||
val password: String?
|
val password: String?
|
||||||
) : CaptchaCodeParam()
|
) : CaptchaCodeParam()
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package top.fatweb.oxygen.api.param.permission
|
|||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema
|
import io.swagger.v3.oas.annotations.media.Schema
|
||||||
import jakarta.validation.constraints.NotBlank
|
import jakarta.validation.constraints.NotBlank
|
||||||
import jakarta.validation.constraints.Pattern
|
import jakarta.validation.constraints.Size
|
||||||
import top.fatweb.oxygen.api.annotation.Trim
|
import top.fatweb.oxygen.api.annotation.Trim
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -32,7 +32,7 @@ data class VerifyParam(
|
|||||||
*/
|
*/
|
||||||
@Trim
|
@Trim
|
||||||
@Schema(description = "昵称", example = "QwQ")
|
@Schema(description = "昵称", example = "QwQ")
|
||||||
@field:Pattern(regexp = "^.{3,20}$", message = "Nickname must be 3-20 characters")
|
@field:Size(min = 3, max = 20, message = "Nickname must be 3-20 characters")
|
||||||
var nickname: String?,
|
var nickname: String?,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -30,6 +30,6 @@ data class UserChangePasswordParam(
|
|||||||
*/
|
*/
|
||||||
@Schema(description = "原密码", required = true)
|
@Schema(description = "原密码", required = true)
|
||||||
@field:NotBlank(message = "New password can not be blank")
|
@field:NotBlank(message = "New password can not be blank")
|
||||||
@field:Size(min = 10, max = 30, message = "New password must be 10-20 characters")
|
@field:Size(min = 10, max = 30, message = "New password must be 10-30 characters")
|
||||||
val newPassword: String?
|
val newPassword: String?
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ data class UserInfoUpdateParam(
|
|||||||
@Trim
|
@Trim
|
||||||
@Schema(description = "昵称", example = "QwQ")
|
@Schema(description = "昵称", example = "QwQ")
|
||||||
@field:NotBlank(message = "Nickname can not be blank")
|
@field:NotBlank(message = "Nickname can not be blank")
|
||||||
@field:Size(min = 3, max = 30, message = "Nickname must be 3-20 characters")
|
@field:Size(min = 3, max = 20, message = "Nickname must be 3-20 characters")
|
||||||
var nickname: String?
|
var nickname: String?
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -21,6 +21,6 @@ data class MailSendParam(
|
|||||||
*/
|
*/
|
||||||
@Trim
|
@Trim
|
||||||
@Schema(description = "接收者", required = true, example = "user@email.com")
|
@Schema(description = "接收者", required = true, example = "user@email.com")
|
||||||
@field:NotBlank
|
@field:NotBlank(message = "Receiver cannot be blank")
|
||||||
var to: String?
|
var to: String?
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -62,8 +62,5 @@ logging:
|
|||||||
# max-file-size: 10MB # Maximum log file size
|
# max-file-size: 10MB # Maximum log file size
|
||||||
# max-history: 7 # Maximum number of archive log files to keep
|
# max-history: 7 # Maximum number of archive log files to keep
|
||||||
|
|
||||||
mybatis-plus:
|
|
||||||
type-aliases-package: top.fatweb.oxygen.api.entity
|
|
||||||
|
|
||||||
knife4j:
|
knife4j:
|
||||||
production: true # Production environment mode will block doc
|
production: true # Production environment mode will block doc
|
||||||
Reference in New Issue
Block a user