From 4018693fbdd640551de3d0fc521c2c208000624a Mon Sep 17 00:00:00 2001 From: ilylia Date: Mon, 13 Nov 2017 14:36:08 +0800 Subject: [PATCH] add Enum field to Schema --- swagger/swagger.go | 1 + 1 file changed, 1 insertion(+) diff --git a/swagger/swagger.go b/swagger/swagger.go index 89fef8a6..105d7fa4 100644 --- a/swagger/swagger.go +++ b/swagger/swagger.go @@ -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