Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
If properties are always included then the parser will be happy even if
properties is an empty list.
  • Loading branch information
achew22 committed Jan 9, 2016
1 parent 12f6572 commit 0d08cf0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion protoc-gen-swagger/genswagger/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ type swaggerSchemaObject struct {
Type string `json:"type,omitempty"`
Format string `json:"format,omitempty"`
// Properties can be recursively defined
Properties map[string]swaggerSchemaObject `json:"properties,omitempty"`
// To work around https://github.com/OAI/OpenAPI-Specification/issues/452
// always include properties even if it is empty.
Properties map[string]swaggerSchemaObject `json:"properties"`
Items *swaggerItemsObject `json:"items,omitempty"`

// If the item is an enumeration include a list of all the *NAMES* of the
Expand Down

0 comments on commit 0d08cf0

Please sign in to comment.