It seems to me that the api spec for the endpoint
https://docs.kubermatic.com/kubermatic/v2.28/references/rest-api-reference/#/project/listClustersV2
does not match the generated go code.
The code says:
type ListClustersV2OK struct {
Payload models.ClusterList
}
and that Payload type is just a slice of Clusters.
However the response actually contains a field called "clusters".
Therefore it cannot map the response properly and fails.
The actual api call succeeds, just not parsing the result.
"json: cannot unmarshal object into Go value of type models.ClusterList"
KKP Version is 2.28 and client too.
It seems to me that the api spec for the endpoint
https://docs.kubermatic.com/kubermatic/v2.28/references/rest-api-reference/#/project/listClustersV2
does not match the generated go code.
The code says:
and that Payload type is just a slice of Clusters.
However the response actually contains a field called "clusters".
Therefore it cannot map the response properly and fails.
The actual api call succeeds, just not parsing the result.
"json: cannot unmarshal object into Go value of type models.ClusterList"
KKP Version is 2.28 and client too.