1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-23 06:10:51 +00:00

Merge pull request #2928 from ilylia/develop

add Enum field to Schema
This commit is contained in:
astaxie 2017-11-19 10:27:11 +08:00 committed by GitHub
commit dfea2cc5f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,6 +121,7 @@ type Schema struct {
Type string `json:"type,omitempty" yaml:"type,omitempty"`
Items *Schema `json:"items,omitempty" yaml:"items,omitempty"`
Properties map[string]Propertie `json:"properties,omitempty" yaml:"properties,omitempty"`
Enum []interface{} `json:"enum,omitempty" yaml:"enum,omitempty"`
}
// Propertie are taken from the JSON Schema definition but their definitions were adjusted to the Swagger Specification