You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My use case is that I want to generate a client that can add arbitrary key-value pairs to the query-string of a request. I think it is possible to define this in OpenAPI 3 (not 2), but I don't think that autorest.go supports it yet.
Although, I wonder if we should use url.Values instead of a map[string]string. It's not quite the same as what's being asked for in the OpenAPI but it would provide the most flexibility.
Looks good. I think I'd be inclined to implement as documented by openapi (i.e using type: object, and not supporting multiple query items with the same key) rather than a special case that might be unique to autorest.go?
My use case is that I want to generate a client that can add arbitrary key-value pairs to the query-string of a request. I think it is possible to define this in OpenAPI 3 (not 2), but I don't think that autorest.go supports it yet.
For example, I can specify the following:
And that will generate a Go client that contains this snippet:
This is really close, but I end up with a dynamic querystring
?query=a&query=b
, and I want to express a dynamic querystring?foo=a&bar=b
, etc.What I want to be able to do is instead of specifying an array of type string, specify an object with additionalProperties string.
Reading https://swagger.io/docs/specification/serialization/, I think this is a legitimate thing to be able to express in OpenAPI 3.
However when I do that, I get the error
Error: unexpected type map[string]*string for QueryCollectionParameter Query
.Would it be possible to make this work? Thanks!
The text was updated successfully, but these errors were encountered: