Small issue: CognitoEventUserPoolsMigrateUser request/response fields are not named
- Dominant language
- Go
- Stars
- 3.8k
- Forks
- 578
- Avg merge
- 8h 18m
- Merged PRs (30d)
- 1
Description
Other Cognito event structs look like:
```go
type CognitoEventUserPoolsPostAuthentication struct {
CognitoEventUserPoolsHeader
Request CognitoEventUserPoolsPostAuthenticationRequest `json:"request"`
Response CognitoEventUserPoolsPostAuthenticationResponse `json:"response"`
}
```
But `CognitoEventUserPoolsMigrateUser` is defined as:
```go
type CognitoEventUserPoolsMigrateUser struct {
CognitoEventUserPoolsHeader
CognitoEventUserPoolsMigrateUserRequest `json:"request"`
CognitoEventUserPoolsMigrateUserResponse `json:"response"`
}
```
So instead of `event.Response.UserAttributes` you have to do either `event.UserAttributes` or `event.CognitoEventUserPoolsMigrateUserResponse.UserAttributes` which both look a bit weird to me and is a bit inconsistent with the other event definitions?
Is this intentional or just a miss?
My suggestion is to change the definition to:
```go
type CognitoEventUserPoolsMigrateUser struct {
CognitoEventUserPoolsHeader
Request CognitoEventUserPoolsMigrateUserRequest `json:"request"`
Response CognitoEventUserPoolsMigrateUserResponse `json:"response"`
}
```
Contributor guide
Assessment
This issue has not been assessed yet.