Return response structs where applicable
Closed this issue · 3 comments
There are still a few methods on the SDK where the return values from the operations are stripped down into more basic types like string or slice. That damages extensibility (without breaking) and introduces inconsistencies.
Ideally a method must map 1:1 to a REST API call and should be like
func(f FooClient)VerbBar([r requiredParams...], params VerbBarParams) (VerbBarResponse, error)
in the schema above adding things to VerbBarParams
(e.g. CreateDeploymentParameters) and VerbBarResponse
(e.g. ListHostedServicesResponse) can be done without breaking the caller.
requiredParams must be list of arguments that don't go into the XML request body but rather used in constructing the REST API request URL. Those must be validated. But we must not validate the arguments in params
structs if they're required or not on the client side (because REST API already does that.)
Opening this issue as a cleanup task.
😕 REST, XML, Hm?
Ong wrong repo
:-)