Skip to content

pinning/http: Pin.meta query string encoding #381

@sanderpick

Description

@sanderpick

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 by exploding the keys: "meta[foo]=one&meta[bar]=two".

If I generate the client with another popular Go OpenAPI generator called oapi-codegen, it uses this lib to encode Pin.meta as URL escaped JSON.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedSeeking public contribution on this issuekind/bugA bug in existing code (including security flaws)need/analysisNeeds further analysis before proceeding

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions