Skip to content

Commit bc1ec47

Browse files
authored
Feature/Add path field in request context struct (#432)
* chg: feat: add path field in request context struct * chg: chore: add path field into request context in apigw jsons
1 parent d1a6fb3 commit bc1ec47

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

events/apigw.go

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ type APIGatewayProxyRequestContext struct {
4040
Protocol string `json:"protocol"`
4141
Identity APIGatewayRequestIdentity `json:"identity"`
4242
ResourcePath string `json:"resourcePath"`
43+
Path string `json:"path"`
4344
Authorizer map[string]interface{} `json:"authorizer"`
4445
HTTPMethod string `json:"httpMethod"`
4546
RequestTime string `json:"requestTime"`

events/testdata/apigw-request.json

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"requestContext": {
6060
"accountId": "12345678912",
6161
"resourceId": "roq9wj",
62+
"path": "/hello/world",
6263
"stage": "testStage",
6364
"domainName": "gy415nuibc.execute-api.us-east-2.amazonaws.com",
6465
"domainPrefix": "y0ne18dixk",

events/testdata/apigw-restapi-openapi-request.json

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"requestContext": {
6060
"accountId": "12345678912",
6161
"resourceId": "roq9wj",
62+
"path": "/hello/world",
6263
"operationName": "HelloWorld",
6364
"stage": "testStage",
6465
"domainName": "gy415nuibc.execute-api.us-east-2.amazonaws.com",

0 commit comments

Comments
 (0)