属性增加枚举值定义
This commit is contained in:
parent
11bf768221
commit
1f5544a0af
@ -137,6 +137,7 @@ type Schema struct {
|
|||||||
type Property struct {
|
type Property struct {
|
||||||
Type string `json:"type"` // 数据类型, swagger本身的定义
|
Type string `json:"type"` // 数据类型, swagger本身的定义
|
||||||
Format string `json:"format"` // 对应编程语言中的数据类型描述
|
Format string `json:"format"` // 对应编程语言中的数据类型描述
|
||||||
|
Enum []any `json:"enum,omitempty"` // 枚举值列表
|
||||||
Default any `json:"default"` // 默认值 : 不同于 JSON Schema,这个值必须符合定义与相同级别的 Schema 对象 中定义的类型,比如 type 是 string,那么 default 可以是 "foo" 但不能是 1。
|
Default any `json:"default"` // 默认值 : 不同于 JSON Schema,这个值必须符合定义与相同级别的 Schema 对象 中定义的类型,比如 type 是 string,那么 default 可以是 "foo" 但不能是 1。
|
||||||
Description string `json:"description"` // 数据描述, CommonMark syntax可以被用来呈现富文本格式.
|
Description string `json:"description"` // 数据描述, CommonMark syntax可以被用来呈现富文本格式.
|
||||||
AllOf []*PropertyXOf `json:"allOf,omitempty"` // type 是一个对象, allOf 指向对象描述
|
AllOf []*PropertyXOf `json:"allOf,omitempty"` // type 是一个对象, allOf 指向对象描述
|
||||||
|
Loading…
x
Reference in New Issue
Block a user