mlsorensen commented on issue #7425:
URL: https://github.com/apache/cloudstack/issues/7425#issuecomment-1507288345

   This actually looks to be a widespread issue with the golang client. None of 
the items in `listApis` return the response object name. This can be seen with 
other commands like `getCloudIdentifier` and `getUser`, which are also broken 
in the golang client.
   
   I'd wager that any API that doesn't return a list response is broken in the 
golang client. Looking at the client code generation, any APIs that begin with 
"list" will automatically be nested in a slice using a parsed name, e.g. 
"listVirtualMachines" gets "list" prefix removed and made singular, and the 
base response key becomes "virtualmachine".
   
   I checked three different 'get' APIs via the golang client and they all 
either unmarshaled to an empty struct (since the response didn't match the 
struct), or threw an unmarshal error.
   
   There's no formulaic way to determine what this base key should be, for 
`getPathForVolume` it is `apipathforvolume`. For `getCloudIdentifier` it is 
`cloudidentifier`, for `getKubernetesClusterConfig ` it is `clusterconfig`.
   
   I think we need to start by providing the response object name in 
`listApis`, then we can overhaul the golang client to make use of this


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to