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
Thanks for reporting this. It is indeed a bug in the generated documentation for our the API.
A bit of technical detail: Our API can be accessed via gRPC or as JSON-over-HTTP, with the latter being implemented in terms of the former. The canonical service definition can be found in api.proto, which uses int64 for these fields, which is encoded as string in JSON to avoid precision loss when used from JavaScript, whose number type only supports integers up to 2^53-1.
As a short-term fix, we have updated our documentation generator and regenerated the documentation to correctly describe these fields as string. In a future version of the API, we will change their type to int32/number, but for now, we want to avoid breaking existing clients.
Reacted by Edoardo Ottavianelli and Christophe de Carvalho
So I have to assume ALL number types in that docs mean string (e.g. edges[].fromNode: number in GetDependencies) or the ones having type uint32 are okay?
Activity
sarnesjo commentedon Jan 10, 2024
Thanks for reporting this. It is indeed a bug in the generated documentation for our the API.
A bit of technical detail: Our API can be accessed via gRPC or as JSON-over-HTTP, with the latter being implemented in terms of the former. The canonical service definition can be found in api.proto, which uses
int64for these fields, which is encoded asstringin JSON to avoid precision loss when used from JavaScript, whosenumbertype only supports integers up to 2^53-1.As a short-term fix, we have updated our documentation generator and regenerated the documentation to correctly describe these fields as
string. In a future version of the API, we will change their type toint32/number, but for now, we want to avoid breaking existing clients.edoardottt commentedon Jan 10, 2024
Thank you so much for the answer @sarnesjo.
So I have to assume ALL number types in that docs mean string (e.g. edges[].fromNode: number in GetDependencies) or the ones having type uint32 are okay?
api/v3alpha: update Query endpoint, use int32