fix: do not explode query params be default

This commit is contained in:
Daniel G. Taylor 2020-04-23 09:21:11 -07:00
parent 71ffa25c67
commit 626a54ba2d
No known key found for this signature in database
GPG key ID: 7BD6DC99C9A87E22

View file

@ -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.
@ -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)
}