Skip to content

Commit

Permalink
fix: do not explode query params be default
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgtaylor committed Apr 23, 2020
1 parent 71ffa25 commit 626a54b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type openAPIParam struct {
Schema *schema.Schema `json:"schema,omitempty"`
Deprecated bool `json:"deprecated,omitempty"`
Example interface{} `json:"example,omitempty"`
Explode *bool `json:"explode,omitempty"`

// Internal params are excluded from the OpenAPI document and can set up
// params sent between a load balander / proxy and the service internally.
Expand All @@ -48,6 +49,10 @@ func newOpenAPIParam(name, description string, in paramLocation, options ...Para
In: in,
}

if in == inQuery {
p.Explode = new(bool)
}

for _, option := range options {
option.applyParam(p)
}
Expand Down

0 comments on commit 626a54b

Please sign in to comment.