go-client icon indicating copy to clipboard operation
go-client copied to clipboard

Some requests take a struct, some take map[string]interface{}

Open markschmid opened this issue 5 years ago • 0 comments

For example see the PatchUser method:

// PatchUser
// Updates, via PATCH, the user with the given Id.
//   string userId The Id of the user to update.
//   UserActionRequest request The request that contains just the new user action information.
func (c *FusionAuthClient) PatchUser(userId string, request map[string]interface{}) (*UserResponse, *Errors, error) {

According to the documentation, the second param is supposed to be a UserActionRequest (which is defined in Domain.go), but the method takes a map[string]interface{}. I can work around it for now, but it seems there's a mix of methods that take specific request structs and others that take generic map[string]interface{}

markschmid avatar Aug 04 '20 13:08 markschmid