brendanhay/gogol

Do not know how to use some endpoints - cannot find corresponding *Response definitions for those

Closed this issue · 2 comments

Hi

I successfully used endpoints like Network.Google.Resource.Container.Projects.Zones.Clusters.List for instance.

But i cannot seem to figure out where the corresponding *Response definition is for this call:
https://hackage.haskell.org/package/gogol-compute-0.2.0/docs/Network-Google-Resource-Compute-Networks-List.html

Or perhaps it does not exist in the json definition and someone is supposed to add it? I wouldn't mind extending the json spec if needed. Is there some guide that explains how to do this?

Thanks

Hi @ababkin, the request name is NetworksList and the response is NetworkList. This is because the NetworkList type is 'shared', and also returned by other methods/operations. The naming is unfortunate, but it corresponds to both the types and operations in the JSON spec.

We can see this in the servant method signature, where Get [JSON] NetworkList is the response.

thanks Brendan for being super-helpful as always!