pinning/http: Pin.meta query string encoding
- Dominant language
- Go
- Stars
- 316
- Forks
- 163
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 8
Description
When listing pins, `Pin.meta` is sent as `fmt.Sprintf("%v", obj)` where `obj` is `map[string]string`, e.g., `meta=map[foo:one bar:two]` (after URL unescaping). That's a bit awkward to parse on the backend. Is there a more idiomatic way to send a `map` as a query param?
Gin [encodes maps](https://github.com/gin-gonic/gin#map-as-querystring-or-postform-parameters) by exploding the keys: "meta[foo]=one&meta[bar]=two".
If I generate the client with another popular Go OpenAPI generator called [oapi-codegen](https://github.com/deepmap/oapi-codegen), it uses [this lib](https://github.com/deepmap/oapi-codegen/blob/master/pkg/runtime/styleparam.go) to encode `Pin.meta` as URL escaped JSON.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.