ipfs / pinning-services-api-spec

Standalone, vendor-agnostic Pinning Service API for IPFS ecosystem
https://ipfs.github.io/pinning-services-api-spec/
Creative Commons Zero v1.0 Universal
100 stars 27 forks source link

golang client fails to deserialize metadata objects #81

Open lidel opened 2 years ago

lidel commented 2 years ago

Upstream bug: https://github.com/ipfs/boxo/issues/384

TLDR: if metadata has value other than string, go-pinning-service-http-client fails to deserialize, for example Estuary (@whyrusleeping) wanted to return pin progress like this:

"info": {
  "obj_fetched": 1234,
  "size_fetched": 571232,
}

go-ipfs does not expose them to end users on the CLI/API, and I don't think existing pinning services are exposing metadata fields in GUI in production yet (cc @obo20), but filling this issue anyway for discoverability.

TLDR Workaround

If anyone thinks about utilizing metadata fields PinStatus.info and Pin.meta, use only string values for now.