1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 23:40:56 +00:00

Merge pull request #2102 from tnextday/develop

update swagger ParameterItems
This commit is contained in:
astaxie 2016-08-22 11:42:22 +08:00 committed by GitHub
commit bed907653e

View File

@ -96,6 +96,17 @@ type Parameter struct {
Schema *Schema `json:"schema,omitempty"` Schema *Schema `json:"schema,omitempty"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty"`
Format string `json:"format,omitempty"` Format string `json:"format,omitempty"`
Items *ParameterItems `json:"items,omitempty"`
}
// A limited subset of JSON-Schema's items object. It is used by parameter definitions that are not located in "body".
// http://swagger.io/specification/#itemsObject
type ParameterItems struct {
Type string `json:"type,omitempty"`
Format string `json:"format,omitempty"`
Items []*ParameterItems `json:"items,omitempty"` //Required if type is "array". Describes the type of items in the array.
CollectionFormat string `json:"collectionFormat,omitempty"`
Default string `json:"default,omitempty"`
} }
// Schema Object allows the definition of input and output data types. // Schema Object allows the definition of input and output data types.
@ -106,7 +117,7 @@ type Schema struct {
Description string `json:"description,omitempty"` Description string `json:"description,omitempty"`
Required []string `json:"required,omitempty"` Required []string `json:"required,omitempty"`
Type string `json:"type,omitempty"` Type string `json:"type,omitempty"`
Items *Propertie `json:"items,omitempty"` Items *Schema `json:"items,omitempty"`
Properties map[string]Propertie `json:"properties,omitempty"` Properties map[string]Propertie `json:"properties,omitempty"`
} }