MousaZeidBaker / aws-lambda-typing

Python type hints for AWS Lambda
MIT License
106 stars 19 forks source link

RequestContextV1 missing optional field `operationName`. #72

Closed rangerthegood closed 1 year ago

rangerthegood commented 1 year ago

The RequestContextV1 structure is missing the optional field operationName.

The operationName field is associated with the SDK settings. I know two ways to configure this.

First, While in the AWS API Gateway console, when you are viewing a method for a resource. Click into the "Method Request" section. Expand the "SDK Setting" section. By default this is blank. If you were to set to to something like "SomeOperation", and save. Then go back and test this the method. You will see in the event object passed to the lambda function that it will contain operationName and its value will be SomeOperation.

Second, this operationName is automatically configured if you deployed a restapi from a openapi document where you use the field operationId.