schema 增加 type/enum
This commit is contained in:
parent
3895be6e15
commit
bef28089bd
@ -128,6 +128,8 @@ type Schema struct {
|
|||||||
Deprecated bool `json:"deprecated"` // 表示一个 schema 是废弃的,应该逐渐被放弃使用。默认值是 false.
|
Deprecated bool `json:"deprecated"` // 表示一个 schema 是废弃的,应该逐渐被放弃使用。默认值是 false.
|
||||||
Properties map[string]*Property `json:"properties,omitempty"` // 数据字段 => 数据规则
|
Properties map[string]*Property `json:"properties,omitempty"` // 数据字段 => 数据规则
|
||||||
Required []string `json:"required,omitempty"` // 必传属性列表
|
Required []string `json:"required,omitempty"` // 必传属性列表
|
||||||
|
Enum []any `json:"enum,omitempty"` // 枚举值列表
|
||||||
|
Type string `json:"type"` // 类型
|
||||||
}
|
}
|
||||||
|
|
||||||
// Property 是从 JSON Schema 提取出来的,但是做了一些调整以适应 OpenAPI Specification。
|
// Property 是从 JSON Schema 提取出来的,但是做了一些调整以适应 OpenAPI Specification。
|
||||||
|
Loading…
x
Reference in New Issue
Block a user