Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add httpEvent.operationId to the request context #1325

Merged
merged 1 commit into from Feb 2, 2022

Conversation

qswinson
Copy link
Contributor

@qswinson qswinson commented Feb 2, 2022

Description

AWS ApiGateway defines a operationId value for each http event. This value is available in the running Lambda in the event.requestContext.operationName property. This property value is very helpful if validating requests against an OpenApi spec.

This PR takes the operationId value and makes it available in the event model for both LambdaProxyIntegrationEvent and LambdaProxyIntegrationEventV2

Motivation and Context

This supplies a value that is available when running the Serverless deployment in the AWS environment, but until now, not available in the offline environment.

How Has This Been Tested?

I have added unit and integration tests. We have also been using this code internally for the past year.

Screenshots (if appropriate):

Copy link
Collaborator

@pgrzesik pgrzesik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @qswinson - this looks great - thanks a lot for submitting a PR. I've rerun the tests because it seems like they failed due to an unrelated flaky connection. Once all is good, I'll merge the PR

@pgrzesik pgrzesik changed the title Add httpEvent.operationId to the request context feat: Add httpEvent.operationId to the request context Feb 2, 2022
@pgrzesik pgrzesik merged commit e217fcb into dherault:master Feb 2, 2022
@qswinson qswinson deleted the add-httpEvent-operationId branch January 3, 2023 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants