-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Set operationName in local API request context #2458
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
19aec2e
Set operationName in local API request context
ramosbugs 02011e9
Remove debug line
ramosbugs 0db016c
Merge branch 'develop' into develop-operation-name
awood45 4b715bb
Merge branch 'develop' into develop-operation-name
awood45 3e49ec6
Merge branch 'develop' into develop-operation-name
wchengru ab9a03e
Merge branch 'develop' into develop-operation-name
wchengru b088caf
Resolve dedupe_function_routes, add integration tests
wchengru 3ea20dd
Merge branch 'develop' into develop-operation-name
wchengru b824f81
Merge branch 'develop' into develop-operation-name
wchengru e1c0306
black reformat
wchengru 0f05a65
Merge branch 'develop-operation-name' of github.com:wchengru/aws-sam-…
wchengru e0376ea
fix an issue that V2 swagger still have opertaion name
wchengru 97a1354
fix operationId issue
wchengru fc702f8
Do not send any HttpApi operationId/OpertaionName
wchengru 1197bdb
remove unused code
wchengru 59b3b8b
Merge branch 'develop' into develop-operation-name
wchengru 5b01b8c
Merge branch 'develop' into develop-operation-name
wchengru 036cd5c
Merge branch 'develop-operation-name' into develop-operation-name
wchengru b2e7c99
Merge pull request #1 from wchengru/develop-operation-name
ramosbugs 71fcedd
Merge branch 'develop' into develop-operation-name
jfuss d61a434
Merge branch 'develop' into develop-operation-name
wchengru cc5e7e3
Merge branch 'develop' into develop-operation-name
wchengru 73453ac
refactor if conditions, and fix test cases to confirm that the new ke…
1d9bd8a
small changes on comments
ec857d9
remove debug line
964373d
Merge branch 'develop' into develop-operation-name
wchengru File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this used for all API Events? If so, shouldn't we model different RequestsContext's for different events?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we have different RequestContext for V1 and V2 events. This is for v1 events only, it only used in
aws-sam-cli/samcli/local/apigw/local_apigw_service.py
Line 682 in 59f2d19
For v2 api, it is using RequestContextV2:
aws-sam-cli/samcli/local/apigw/local_apigw_service.py
Line 752 in 59f2d19
The httpapi with payload v1 is also using this type of event. For httpapi or restapi without "operationName", it won't be passed into the RequestContext map: https://github.com/aws/aws-sam-cli/pull/2458/files#diff-0ffb9968392fca338c633173f593848b7301fb166fcf56bd3178994d15e1c88aR150