增加标签获取
This commit is contained in:
@ -140,11 +140,11 @@ type Schema struct {
|
||||
//
|
||||
// Date : 17:05 2024/7/19
|
||||
type Property struct {
|
||||
Type string `json:"type"` // 数据类型, swagger本身的定义
|
||||
Format string `json:"format"` // 对应编程语言中的数据类型描述
|
||||
Enum []any `json:"enum,omitempty"` // 枚举值列表
|
||||
Default any `json:"default"` // 默认值 : 不同于 JSON Schema,这个值必须符合定义与相同级别的 Schema 对象 中定义的类型,比如 type 是 string,那么 default 可以是 "foo" 但不能是 1。
|
||||
Description string `json:"description"` // 数据描述, CommonMark syntax可以被用来呈现富文本格式.
|
||||
Type string `json:"type,omitempty"` // 数据类型, swagger本身的定义
|
||||
Format string `json:"format,omitempty"` // 对应编程语言中的数据类型描述
|
||||
Enum []string `json:"enum,omitempty"` // 枚举值列表
|
||||
Default string `json:"default,omitempty"` // 默认值 : 不同于 JSON Schema,这个值必须符合定义与相同级别的 Schema 对象 中定义的类型,比如 type 是 string,那么 default 可以是 "foo" 但不能是 1。
|
||||
Description string `json:"description,omitempty"` // 数据描述, CommonMark syntax可以被用来呈现富文本格式.
|
||||
AllOf []*PropertyXOf `json:"allOf,omitempty"` // type 是一个对象, allOf 指向对象描述
|
||||
OneOf []*PropertyXOf `json:"oneOf,omitempty"` // type 是一个对象, allOf 指向对象描述
|
||||
AnyOf []*PropertyXOf `json:"anyOf,omitempty"` // type 是一个对象, allOf 指向对象描述
|
||||
|
24
define/tag.go
Normal file
24
define/tag.go
Normal file
@ -0,0 +1,24 @@
|
||||
// Package define ...
|
||||
//
|
||||
// Description : define ...
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2025-02-11 21:51
|
||||
package define
|
||||
|
||||
const (
|
||||
TagJson = "json"
|
||||
TagXml = "xml"
|
||||
TagYaml = "yaml"
|
||||
TagYml = "yml"
|
||||
TagForm = "form"
|
||||
TagBinding = "binding"
|
||||
TagValidate = "validate"
|
||||
TagErr = "err"
|
||||
TagMsg = "msg"
|
||||
TagDesc = "desc"
|
||||
TagDescription = "description"
|
||||
TagD = "d"
|
||||
TagDefault = "default"
|
||||
)
|
Reference in New Issue
Block a user