Implement update tool
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package top.fatweb.oxygen.api.param.permission.group
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotEmpty
|
||||
|
||||
/**
|
||||
* Delete group parameters
|
||||
@@ -17,5 +18,6 @@ data class GroupDeleteParam(
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "用户组 ID 列表", required = true)
|
||||
val ids: List<Long>
|
||||
@field: NotEmpty(message = "Ids can not be empty")
|
||||
val ids: List<Long>?
|
||||
)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package top.fatweb.oxygen.api.param.permission.role
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotEmpty
|
||||
|
||||
/**
|
||||
* Delete role parameters
|
||||
@@ -17,5 +18,6 @@ data class RoleDeleteParam(
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "角色 ID 列表", required = true)
|
||||
val ids: List<Long>
|
||||
@field: NotEmpty(message = "Ids can not be empty")
|
||||
val ids: List<Long>?
|
||||
)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package top.fatweb.oxygen.api.param.permission.user
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotEmpty
|
||||
|
||||
/**
|
||||
* Delete user parameters
|
||||
@@ -17,5 +18,6 @@ data class UserDeleteParam(
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "用户 ID 列表", required = true)
|
||||
val ids: List<Long>
|
||||
@field: NotEmpty(message = "Ids can not be empty")
|
||||
val ids: List<Long>?
|
||||
)
|
||||
|
||||
@@ -86,7 +86,7 @@ data class ToolCreateParam(
|
||||
*/
|
||||
@Schema(description = "关键词", required = true)
|
||||
@field: NotEmpty(message = "Keywords can not be empty")
|
||||
val keywords: List<String>,
|
||||
val keywords: List<String>?,
|
||||
|
||||
/**
|
||||
* Categories
|
||||
@@ -96,5 +96,5 @@ data class ToolCreateParam(
|
||||
*/
|
||||
@Schema(description = "类别", required = true)
|
||||
@field: NotEmpty(message = "Categories can not be empty")
|
||||
val categories: List<Long>
|
||||
val categories: List<Long>?
|
||||
)
|
||||
|
||||
@@ -2,7 +2,6 @@ package top.fatweb.oxygen.api.param.tool
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema
|
||||
import jakarta.validation.constraints.NotNull
|
||||
import jakarta.validation.constraints.Pattern
|
||||
|
||||
/**
|
||||
* Update tool parameters
|
||||
@@ -10,6 +9,7 @@ import jakarta.validation.constraints.Pattern
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "更新工具请求参数")
|
||||
data class ToolUpdateParam(
|
||||
/**
|
||||
* ID
|
||||
@@ -31,17 +31,13 @@ data class ToolUpdateParam(
|
||||
val name: String?,
|
||||
|
||||
/**
|
||||
* Tool ID
|
||||
* Icon
|
||||
*
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "工具唯一 ID", example = "tool_a")
|
||||
@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?,
|
||||
@Schema(description = "图标")
|
||||
val icon: String?,
|
||||
|
||||
/**
|
||||
* Description
|
||||
@@ -52,34 +48,6 @@ data class ToolUpdateParam(
|
||||
@Schema(description = "简介")
|
||||
val description: String?,
|
||||
|
||||
/**
|
||||
* Author ID
|
||||
*
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "作者 ID")
|
||||
val authorId: Long?,
|
||||
|
||||
/**
|
||||
* Version
|
||||
*
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "版本", example = "1.0.3")
|
||||
@field: Pattern(regexp = "^\\d+\\.\\d+\\.\\d+\$", message = "Ver can only match '<number>.<number>.<number>'")
|
||||
val ver: String?,
|
||||
|
||||
/**
|
||||
* Privately
|
||||
*
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "私有", allowableValues = ["true", "false"])
|
||||
val privately: Boolean?,
|
||||
|
||||
/**
|
||||
* Keywords
|
||||
*
|
||||
@@ -87,7 +55,7 @@ data class ToolUpdateParam(
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "关键词")
|
||||
val keywords: List<String>,
|
||||
val keywords: List<String>?,
|
||||
|
||||
/**
|
||||
* Categories
|
||||
@@ -96,7 +64,7 @@ data class ToolUpdateParam(
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "类别")
|
||||
val categories: List<Long>,
|
||||
val categories: List<Long>?,
|
||||
|
||||
/**
|
||||
* Source
|
||||
@@ -105,14 +73,5 @@ data class ToolUpdateParam(
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "源码")
|
||||
val source: String?,
|
||||
|
||||
/**
|
||||
* Dist
|
||||
*
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "产物")
|
||||
val dist: String?
|
||||
val source: String?
|
||||
)
|
||||
|
||||
@@ -10,7 +10,7 @@ import jakarta.validation.constraints.Pattern
|
||||
* @author FatttSnake, fatttsnake@gmail.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Schema(description = "更新工具请求参数")
|
||||
@Schema(description = "升级工具请求参数")
|
||||
data class ToolUpgradeParam(
|
||||
/**
|
||||
* Tool ID
|
||||
|
||||
Reference in New Issue
Block a user