Skip to content

Commit

Permalink
Revert #408 and update alb response annotation per #408's original in…
Browse files Browse the repository at this point in the history
…tent (#455)

* Revert "Add `omitempty` to ALBTargetGroupRequest.Body (#408)"

This reverts commit 14da40f.

* update alb response struct per #408 intent
  • Loading branch information
bmoffatt authored Jul 27, 2022
1 parent 151c2c1 commit 077490b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions events/alb.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type ALBTargetGroupRequest struct {
MultiValueHeaders map[string][]string `json:"multiValueHeaders,omitempty"`
RequestContext ALBTargetGroupRequestContext `json:"requestContext"`
IsBase64Encoded bool `json:"isBase64Encoded"`
Body string `json:"body,omitempty"`
Body string `json:"body"`
}

// ALBTargetGroupRequestContext contains the information to identify the load balancer invoking the lambda
Expand All @@ -29,6 +29,6 @@ type ALBTargetGroupResponse struct {
StatusDescription string `json:"statusDescription"`
Headers map[string]string `json:"headers"`
MultiValueHeaders map[string][]string `json:"multiValueHeaders"`
Body string `json:"body"`
Body string `json:"body,omitempty"`
IsBase64Encoded bool `json:"isBase64Encoded"`
}
3 changes: 2 additions & 1 deletion events/testdata/alb-lambda-target-request-headers-only.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"x-imforwards": "20",
"x-myheader": "123"
},
"body": "",
"isBase64Encoded": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
"123"
]
},
"body": "Some text",
"body": "",
"isBase64Encoded": false
}
}

0 comments on commit 077490b

Please sign in to comment.