Automatically remove spaces on both sides of parameters
This commit is contained in:
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.param
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Captcha code parameter
|
||||
@@ -9,6 +10,7 @@ import jakarta.validation.constraints.NotBlank
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
open class CaptchaCodeParam {
|
||||
/**
|
||||
* Captcha code
|
||||
@@ -16,6 +18,7 @@ open class CaptchaCodeParam {
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "验证码", required = true)
|
||||
@field:NotBlank(message = "Captcha code can not be blank")
|
||||
var captchaCode: String? = null
|
||||
|
||||
@@ -3,6 +3,7 @@ package top.fatweb.oxygen.api.param.permission
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import jakarta.validation.constraints.Pattern
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
import top.fatweb.oxygen.api.param.CaptchaCodeParam
|
||||
|
||||
/**
|
||||
@@ -12,6 +13,7 @@ import top.fatweb.oxygen.api.param.CaptchaCodeParam
|
||||
* @since 1.0.0
|
||||
* @see CaptchaCodeParam
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "忘记密码请求参数")
|
||||
data class ForgetParam(
|
||||
/**
|
||||
@@ -20,8 +22,9 @@ data class ForgetParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "邮箱", required = true, example = "user@email.com")
|
||||
@field:NotBlank(message = "Email can not be blank")
|
||||
@field:Pattern(regexp = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*\$", message = "Illegal email address")
|
||||
val email: String?
|
||||
var email: String?
|
||||
) : CaptchaCodeParam()
|
||||
|
||||
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.param.permission
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
import top.fatweb.oxygen.api.param.CaptchaCodeParam
|
||||
|
||||
/**
|
||||
@@ -11,6 +12,7 @@ import top.fatweb.oxygen.api.param.CaptchaCodeParam
|
||||
* @since 1.0.0
|
||||
* @see CaptchaCodeParam
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "登录请求参数")
|
||||
data class LoginParam(
|
||||
/**
|
||||
@@ -19,9 +21,10 @@ data class LoginParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "账户", required = true, example = "test")
|
||||
@field:NotBlank(message = "Account can not be blank")
|
||||
val account: String?,
|
||||
var account: String?,
|
||||
|
||||
/**
|
||||
* Password
|
||||
|
||||
@@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema
|
||||
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.param.CaptchaCodeParam
|
||||
|
||||
/**
|
||||
@@ -13,6 +14,7 @@ import top.fatweb.oxygen.api.param.CaptchaCodeParam
|
||||
* @since 1.0.0
|
||||
* @see CaptchaCodeParam
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "注册请求参数")
|
||||
data class RegisterParam(
|
||||
/**
|
||||
@@ -21,10 +23,11 @@ data class RegisterParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "用户名", required = true, example = "abc")
|
||||
@field:NotBlank(message = "Username can not be blank")
|
||||
@field:Pattern(regexp = "[a-zA-Z-_][0-9a-zA-Z-_]{2,38}", message = "Illegal username")
|
||||
val username: String?,
|
||||
var username: String?,
|
||||
|
||||
/**
|
||||
* Email
|
||||
@@ -32,10 +35,11 @@ data class RegisterParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "邮箱", required = true, example = "user@email.com")
|
||||
@field:NotBlank(message = "Email can not be blank")
|
||||
@field:Pattern(regexp = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*\$", message = "Illegal email address")
|
||||
val email: String?,
|
||||
var email: String?,
|
||||
|
||||
/**
|
||||
* Password
|
||||
|
||||
@@ -3,6 +3,7 @@ package top.fatweb.oxygen.api.param.permission
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import jakarta.validation.constraints.Pattern
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Verify email parameters
|
||||
@@ -10,6 +11,7 @@ import jakarta.validation.constraints.Pattern
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "验证邮箱请求参数")
|
||||
data class VerifyParam(
|
||||
/**
|
||||
@@ -28,9 +30,10 @@ data class VerifyParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "昵称", example = "QwQ")
|
||||
@field:Pattern(regexp = "^.{3,20}$", message = "Nickname must be 3-20 characters")
|
||||
val nickname: String?,
|
||||
var nickname: String?,
|
||||
|
||||
/**
|
||||
* Avatar
|
||||
|
||||
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.param.permission.group
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Add group parameters
|
||||
@@ -9,6 +10,7 @@ import jakarta.validation.constraints.NotBlank
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "用户组添加请求参数")
|
||||
data class GroupAddParam(
|
||||
/**
|
||||
@@ -17,9 +19,10 @@ data class GroupAddParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "用户组名称", required = true, example = "Group_1")
|
||||
@field:NotBlank(message = "Name can not be blank")
|
||||
val name: String?,
|
||||
var name: String?,
|
||||
|
||||
/**
|
||||
* Enable
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package top.fatweb.oxygen.api.param.permission.group
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
import top.fatweb.oxygen.api.param.PageSortParam
|
||||
|
||||
/**
|
||||
@@ -10,6 +11,7 @@ import top.fatweb.oxygen.api.param.PageSortParam
|
||||
* @since 1.0.0
|
||||
* @see PageSortParam
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "用户组查询请求参数")
|
||||
data class GroupGetParam(
|
||||
/**
|
||||
@@ -18,8 +20,9 @@ data class GroupGetParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "查询用户组名称", example = "Group_1")
|
||||
val searchName: String?,
|
||||
var searchName: String?,
|
||||
|
||||
/**
|
||||
* Use regex
|
||||
|
||||
@@ -3,6 +3,7 @@ package top.fatweb.oxygen.api.param.permission.group
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import jakarta.validation.constraints.NotNull
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Update group parameters
|
||||
@@ -10,6 +11,7 @@ import jakarta.validation.constraints.NotNull
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "用户组更新请求参数")
|
||||
data class GroupUpdateParam(
|
||||
/**
|
||||
@@ -28,9 +30,10 @@ data class GroupUpdateParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "用户组名称", required = true, example = "Group_1")
|
||||
@field:NotBlank(message = "Name can not be blank")
|
||||
val name: String?,
|
||||
var name: String?,
|
||||
|
||||
/**
|
||||
* Enable
|
||||
|
||||
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.param.permission.role
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Add role parameters
|
||||
@@ -9,6 +10,7 @@ import jakarta.validation.constraints.NotBlank
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "角色添加请求参数")
|
||||
data class RoleAddParam(
|
||||
/**
|
||||
@@ -17,9 +19,10 @@ data class RoleAddParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "角色名称", required = true, example = "Role_1")
|
||||
@field:NotBlank(message = "Name can not be blank")
|
||||
val name: String?,
|
||||
var name: String?,
|
||||
|
||||
/**
|
||||
* Enable
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package top.fatweb.oxygen.api.param.permission.role
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
import top.fatweb.oxygen.api.param.PageSortParam
|
||||
|
||||
/**
|
||||
@@ -10,6 +11,7 @@ import top.fatweb.oxygen.api.param.PageSortParam
|
||||
* @since 1.0.0
|
||||
* @see PageSortParam
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "角色查询请求参数")
|
||||
data class RoleGetParam(
|
||||
/**
|
||||
@@ -18,8 +20,9 @@ data class RoleGetParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "查询角色名称", example = "Role_1")
|
||||
val searchName: String?,
|
||||
var searchName: String?,
|
||||
|
||||
/**
|
||||
* Use regex
|
||||
|
||||
@@ -3,6 +3,7 @@ package top.fatweb.oxygen.api.param.permission.role
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import jakarta.validation.constraints.NotNull
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Update role parameters
|
||||
@@ -10,6 +11,7 @@ import jakarta.validation.constraints.NotNull
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "角色更新请求参数")
|
||||
data class RoleUpdateParam(
|
||||
/**
|
||||
@@ -28,9 +30,10 @@ data class RoleUpdateParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "角色名称", required = true, example = "Role_1")
|
||||
@field:NotBlank(message = "Name can not be blank")
|
||||
val name: String?,
|
||||
var name: String?,
|
||||
|
||||
/**
|
||||
* Enable
|
||||
|
||||
@@ -3,6 +3,7 @@ package top.fatweb.oxygen.api.param.permission.user
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import jakarta.validation.constraints.Pattern
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
import java.time.LocalDateTime
|
||||
|
||||
/**
|
||||
@@ -11,6 +12,7 @@ import java.time.LocalDateTime
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "添加用户请求参数")
|
||||
data class UserAddParam(
|
||||
/**
|
||||
@@ -19,9 +21,10 @@ data class UserAddParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "用户名", required = true, example = "User_1")
|
||||
@field:NotBlank(message = "Username can not be blank")
|
||||
val username: String?,
|
||||
var username: String?,
|
||||
|
||||
/**
|
||||
* Password
|
||||
@@ -85,9 +88,10 @@ data class UserAddParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "昵称", required = true, example = "Nickname_1")
|
||||
@field:NotBlank(message = "Nickname can not be blank")
|
||||
val nickname: String?,
|
||||
var nickname: String?,
|
||||
|
||||
/**
|
||||
* Avatar base63
|
||||
@@ -104,10 +108,11 @@ data class UserAddParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "邮箱", required = true, example = "user@email.com")
|
||||
@NotBlank(message = "Email can not be blank")
|
||||
@Pattern(regexp = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*\$", message = "Illegal email address")
|
||||
val email: String?,
|
||||
var email: String?,
|
||||
|
||||
/**
|
||||
* List of role IDs
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package top.fatweb.oxygen.api.param.permission.user
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
import top.fatweb.oxygen.api.param.PageSortParam
|
||||
|
||||
/**
|
||||
@@ -10,6 +11,7 @@ import top.fatweb.oxygen.api.param.PageSortParam
|
||||
* @since 1.0.0
|
||||
* @see PageSortParam
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "查询用户请求参数")
|
||||
data class UserGetParam(
|
||||
/**
|
||||
@@ -32,8 +34,9 @@ data class UserGetParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "查询内容", example = "User_1")
|
||||
val searchValue: String?,
|
||||
var searchValue: String?,
|
||||
|
||||
/**
|
||||
* Use regex
|
||||
|
||||
@@ -3,6 +3,7 @@ package top.fatweb.oxygen.api.param.permission.user
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import jakarta.validation.constraints.Size
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Update user information parameters
|
||||
@@ -10,6 +11,7 @@ import jakarta.validation.constraints.Size
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "更新用户信息请求参数")
|
||||
data class UserInfoUpdateParam(
|
||||
/**
|
||||
@@ -27,8 +29,9 @@ data class UserInfoUpdateParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "昵称", example = "QwQ")
|
||||
@field:NotBlank(message = "Nickname can not be blank")
|
||||
@field:Size(min = 3, max = 30, message = "Nickname must be 3-20 characters")
|
||||
val nickname: String?
|
||||
var nickname: String?
|
||||
)
|
||||
|
||||
@@ -4,6 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import jakarta.validation.constraints.NotNull
|
||||
import jakarta.validation.constraints.Pattern
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
import java.time.LocalDateTime
|
||||
|
||||
/**
|
||||
@@ -12,6 +13,7 @@ import java.time.LocalDateTime
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "更新用户请求参数")
|
||||
data class UserUpdateParam(
|
||||
/**
|
||||
@@ -30,9 +32,10 @@ data class UserUpdateParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "用户名", required = true, example = "User_1")
|
||||
@field:NotBlank(message = "Username can not be blank")
|
||||
val username: String?,
|
||||
var username: String?,
|
||||
|
||||
/**
|
||||
* Verified
|
||||
@@ -87,9 +90,10 @@ data class UserUpdateParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "昵称", required = true, example = "Nickname_1")
|
||||
@field:NotBlank(message = "Nickname can not be blank")
|
||||
val nickname: String?,
|
||||
var nickname: String?,
|
||||
|
||||
/**
|
||||
* Avatar base64
|
||||
@@ -106,10 +110,11 @@ data class UserUpdateParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "邮箱", required = true, example = "user@email.com")
|
||||
@NotBlank(message = "Email can not be blank")
|
||||
@Pattern(regexp = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*\$", message = "Illegal email address")
|
||||
val email: String?,
|
||||
var email: String?,
|
||||
|
||||
/**
|
||||
* List of role IDs
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package top.fatweb.oxygen.api.param.system
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Base settings parameters
|
||||
@@ -8,6 +9,7 @@ import io.swagger.v3.oas.annotations.media.Schema
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "基础设置请求参数")
|
||||
data class BaseSettingsParam(
|
||||
/**
|
||||
@@ -16,8 +18,9 @@ data class BaseSettingsParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "应用名称")
|
||||
val appName: String?,
|
||||
var appName: String?,
|
||||
|
||||
/**
|
||||
* Application URL
|
||||
@@ -25,8 +28,9 @@ data class BaseSettingsParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "应用 URL")
|
||||
val appUrl: String?,
|
||||
var appUrl: String?,
|
||||
|
||||
/**
|
||||
* Verify URL
|
||||
@@ -34,8 +38,9 @@ data class BaseSettingsParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "验证邮箱 URL")
|
||||
val verifyUrl: String?,
|
||||
var verifyUrl: String?,
|
||||
|
||||
/**
|
||||
* Retrieve URL
|
||||
@@ -43,6 +48,7 @@ data class BaseSettingsParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "找回密码 URL")
|
||||
val retrieveUrl: String?
|
||||
var retrieveUrl: String?
|
||||
)
|
||||
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.param.system
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Mail send parameters
|
||||
@@ -9,6 +10,7 @@ import jakarta.validation.constraints.NotBlank
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "邮件发送请求参数")
|
||||
data class MailSendParam(
|
||||
/**
|
||||
@@ -17,7 +19,8 @@ data class MailSendParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "接收者", required = true, example = "user@email.com")
|
||||
@field:NotBlank
|
||||
val to: String?
|
||||
var to: String?
|
||||
)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package top.fatweb.oxygen.api.param.system
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
import top.fatweb.oxygen.api.settings.MailSecurityType
|
||||
|
||||
/**
|
||||
@@ -9,6 +10,7 @@ import top.fatweb.oxygen.api.settings.MailSecurityType
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "邮件设置请求参数")
|
||||
data class MailSettingsParam(
|
||||
/**
|
||||
@@ -17,8 +19,9 @@ data class MailSettingsParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "SMTP 服务器")
|
||||
val host: String?,
|
||||
var host: String?,
|
||||
|
||||
/**
|
||||
* Port
|
||||
@@ -26,8 +29,9 @@ data class MailSettingsParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "端口号")
|
||||
val port: Int?,
|
||||
var port: Int?,
|
||||
|
||||
/**
|
||||
* Security type
|
||||
@@ -44,8 +48,9 @@ data class MailSettingsParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "用户名")
|
||||
val username: String?,
|
||||
var username: String?,
|
||||
|
||||
/**
|
||||
* Password
|
||||
@@ -62,8 +67,9 @@ data class MailSettingsParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "发送者")
|
||||
val from: String?,
|
||||
var from: String?,
|
||||
|
||||
/**
|
||||
* Sender name
|
||||
@@ -71,6 +77,7 @@ data class MailSettingsParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "发送者名称")
|
||||
val fromName: String?
|
||||
var fromName: String?
|
||||
)
|
||||
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.param.system
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
import top.fatweb.oxygen.api.entity.system.SensitiveWord
|
||||
|
||||
/**
|
||||
@@ -10,6 +11,7 @@ import top.fatweb.oxygen.api.entity.system.SensitiveWord
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(defaultValue = "敏感词添加请求参数")
|
||||
data class SensitiveWordAddParam(
|
||||
/**
|
||||
@@ -18,9 +20,10 @@ data class SensitiveWordAddParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "词", required = true)
|
||||
@field:NotBlank(message = "Word can not be blank")
|
||||
val word: String?,
|
||||
var word: String?,
|
||||
|
||||
/**
|
||||
* Use for
|
||||
|
||||
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.param.system
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import org.springframework.format.annotation.DateTimeFormat
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
import top.fatweb.oxygen.api.param.PageSortParam
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@@ -12,6 +13,7 @@ import java.time.LocalDateTime
|
||||
* @since 1.0.0
|
||||
* @see PageSortParam
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "获取系统日志请求参数")
|
||||
data class SysLogGetParam(
|
||||
/**
|
||||
@@ -46,8 +48,9 @@ data class SysLogGetParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "查询请求 Url")
|
||||
val searchRequestUrl: String?,
|
||||
var searchRequestUrl: String?,
|
||||
|
||||
/**
|
||||
* Use regex
|
||||
|
||||
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.param.tool
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Add tool base parameters
|
||||
@@ -9,6 +10,7 @@ import jakarta.validation.constraints.NotBlank
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
data class ToolBaseAddParam(
|
||||
/**
|
||||
* Name
|
||||
@@ -16,7 +18,8 @@ data class ToolBaseAddParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "名称", required = true)
|
||||
@field: NotBlank(message = "Name can not be blank")
|
||||
val name: String?
|
||||
var name: String?
|
||||
)
|
||||
|
||||
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.param.tool
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotNull
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Update tool base parameters
|
||||
@@ -9,6 +10,7 @@ import jakarta.validation.constraints.NotNull
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
data class ToolBaseUpdateParam(
|
||||
/**
|
||||
* ID
|
||||
@@ -26,8 +28,9 @@ data class ToolBaseUpdateParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "名称")
|
||||
val name: String?,
|
||||
var name: String?,
|
||||
|
||||
/**
|
||||
* Source
|
||||
|
||||
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.param.tool
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Add tool category parameters
|
||||
@@ -9,6 +10,7 @@ import jakarta.validation.constraints.NotBlank
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
data class ToolCategoryAddParam(
|
||||
/**
|
||||
* Name
|
||||
@@ -16,9 +18,10 @@ data class ToolCategoryAddParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "名称", required = true)
|
||||
@field: NotBlank(message = "Name can not be blank")
|
||||
val name: String?,
|
||||
var name: String?,
|
||||
|
||||
/**
|
||||
* Enable
|
||||
|
||||
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.param.tool
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotNull
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Update tool category parameters
|
||||
@@ -9,6 +10,7 @@ import jakarta.validation.constraints.NotNull
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
data class ToolCategoryUpdateParam(
|
||||
/**
|
||||
* ID
|
||||
@@ -26,8 +28,9 @@ data class ToolCategoryUpdateParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "名称")
|
||||
val name: String?,
|
||||
var name: String?,
|
||||
|
||||
/**
|
||||
* Enable
|
||||
|
||||
@@ -5,6 +5,7 @@ import jakarta.validation.constraints.NotBlank
|
||||
import jakarta.validation.constraints.NotEmpty
|
||||
import jakarta.validation.constraints.NotNull
|
||||
import jakarta.validation.constraints.Pattern
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Create tool parameters
|
||||
@@ -12,6 +13,7 @@ import jakarta.validation.constraints.Pattern
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "创建工具请求参数")
|
||||
data class ToolCreateParam(
|
||||
/**
|
||||
@@ -20,9 +22,10 @@ data class ToolCreateParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "名称", required = true)
|
||||
@field: NotBlank(message = "Name can not be blank")
|
||||
val name: String?,
|
||||
var name: String?,
|
||||
|
||||
/**
|
||||
* Tool ID
|
||||
@@ -30,13 +33,14 @@ data class ToolCreateParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "工具唯一 ID", required = true, example = "tool_a")
|
||||
@field: NotBlank(message = "ToolId can not be blank")
|
||||
@field: Pattern(
|
||||
regexp = "^[a-zA-Z-_][0-9a-zA-Z-_]{2,19}\$",
|
||||
message = "Ver can only match '^[a-zA-Z-_][0-9a-zA-Z-_]{2,19}\$'"
|
||||
)
|
||||
val toolId: String?,
|
||||
var toolId: String?,
|
||||
|
||||
/**
|
||||
* Icon
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package top.fatweb.oxygen.api.param.tool
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
import top.fatweb.oxygen.api.param.PageSortParam
|
||||
|
||||
/**
|
||||
@@ -10,6 +11,7 @@ import top.fatweb.oxygen.api.param.PageSortParam
|
||||
* @since 1.0.0
|
||||
* @see PageSortParam
|
||||
*/
|
||||
@Trim
|
||||
data class ToolManagementGetParam(
|
||||
/**
|
||||
* Type of search
|
||||
@@ -31,8 +33,9 @@ data class ToolManagementGetParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "查询内容", example = "ToolName")
|
||||
val searchValue: String?,
|
||||
var searchValue: String?,
|
||||
|
||||
/**
|
||||
* Use regex
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package top.fatweb.oxygen.api.param.tool
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
import top.fatweb.oxygen.api.param.PageSortParam
|
||||
|
||||
/**
|
||||
@@ -10,7 +11,15 @@ import top.fatweb.oxygen.api.param.PageSortParam
|
||||
* @since 1.0.0
|
||||
* @see PageSortParam
|
||||
*/
|
||||
@Trim
|
||||
data class ToolStoreGetParam(
|
||||
/**
|
||||
* Value to search for
|
||||
*
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "查询内容", example = "ToolName")
|
||||
val searchValue: String?
|
||||
var searchValue: String?
|
||||
) : PageSortParam()
|
||||
|
||||
@@ -3,6 +3,7 @@ package top.fatweb.oxygen.api.param.tool
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import jakarta.validation.constraints.NotNull
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Add tool template parameters
|
||||
@@ -10,6 +11,7 @@ import jakarta.validation.constraints.NotNull
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
data class ToolTemplateAddParam(
|
||||
/**
|
||||
* Name
|
||||
@@ -17,9 +19,10 @@ data class ToolTemplateAddParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "名称", required = true)
|
||||
@field: NotBlank(message = "Name can not be blank")
|
||||
val name: String?,
|
||||
var name: String?,
|
||||
|
||||
/**
|
||||
* Base ID
|
||||
@@ -37,9 +40,10 @@ data class ToolTemplateAddParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "入口文件", required = true)
|
||||
@field:NotBlank(message = "EntryPoint can not be null")
|
||||
val entryPoint: String? = null,
|
||||
var entryPoint: String? = null,
|
||||
|
||||
/**
|
||||
* Enable
|
||||
|
||||
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.param.tool
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotNull
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Update tool template parameters
|
||||
@@ -9,6 +10,7 @@ import jakarta.validation.constraints.NotNull
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
data class ToolTemplateUpdateParam(
|
||||
/**
|
||||
* ID
|
||||
@@ -26,8 +28,9 @@ data class ToolTemplateUpdateParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "名称")
|
||||
val name: String?,
|
||||
var name: String?,
|
||||
|
||||
/**
|
||||
* Base ID
|
||||
@@ -53,8 +56,9 @@ data class ToolTemplateUpdateParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "入口文件")
|
||||
val entryPoint: String?,
|
||||
var entryPoint: String?,
|
||||
|
||||
/**
|
||||
* Enable
|
||||
|
||||
@@ -2,6 +2,7 @@ package top.fatweb.oxygen.api.param.tool
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotNull
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Update tool parameters
|
||||
@@ -9,6 +10,7 @@ import jakarta.validation.constraints.NotNull
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "更新工具请求参数")
|
||||
data class ToolUpdateParam(
|
||||
/**
|
||||
@@ -27,8 +29,9 @@ data class ToolUpdateParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "名称")
|
||||
val name: String?,
|
||||
var name: String?,
|
||||
|
||||
/**
|
||||
* Icon
|
||||
|
||||
@@ -3,6 +3,7 @@ package top.fatweb.oxygen.api.param.tool
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotBlank
|
||||
import jakarta.validation.constraints.Pattern
|
||||
import top.fatweb.oxygen.api.annotation.Trim
|
||||
|
||||
/**
|
||||
* Upgrade tool parameters
|
||||
@@ -10,6 +11,7 @@ import jakarta.validation.constraints.Pattern
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "升级工具请求参数")
|
||||
data class ToolUpgradeParam(
|
||||
/**
|
||||
@@ -18,13 +20,14 @@ data class ToolUpgradeParam(
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Trim
|
||||
@Schema(description = "工具唯一 ID", required = true, example = "tool_a")
|
||||
@field: NotBlank(message = "ToolId can not be blank")
|
||||
@field: Pattern(
|
||||
regexp = "^[a-zA-Z-_][0-9a-zA-Z-_]{2,19}\$",
|
||||
message = "Ver can only match '^[a-zA-Z-_][0-9a-zA-Z-_]{2,19}\$'"
|
||||
)
|
||||
val toolId: String?,
|
||||
var toolId: String?,
|
||||
|
||||
/**
|
||||
* Version
|
||||
|
||||
Reference in New Issue
Block a user