-
Notifications
You must be signed in to change notification settings - Fork 444
feat(event_handler): add Middleware support for REST Event Handler #2917
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
heitorlessa
merged 92 commits into
aws-powertools:develop
from
walmsles:feat/api-middleware
Sep 7, 2023
Merged
Changes from 1 commit
Commits
Show all changes
92 commits
Select commit
Hold shift + click to select a range
fe2341f
feat(rest-middleware): initial work for rest API middleware
walmsles 4cfa87d
feat(rest-middlware): Add in Router based middleware and add Middlewa…
walmsles 4e28b06
feat(api-middleware): remove compression middleware - not implemented…
walmsles edcc6f7
fix(typing): resolve mypy errors
walmsles 2c67e10
Update aws_lambda_powertools/event_handler/api_gateway.py
walmsles 822f16b
Update aws_lambda_powertools/event_handler/api_gateway.py
walmsles 51c3da5
Update aws_lambda_powertools/event_handler/api_gateway.py
walmsles 98da7dc
Update aws_lambda_powertools/event_handler/api_gateway.py
walmsles d775bba
Update aws_lambda_powertools/event_handler/api_gateway.py
walmsles d12fa20
Update aws_lambda_powertools/event_handler/api_gateway.py
walmsles e765ebc
Apply suggestions from code review
walmsles 6e54256
fix(naming-intent): rename middleware to middlewares universally in a…
walmsles 727effb
fix(args-debt): rename args to route_arguments in all places
walmsles 0afe31c
fix(middleware-clarity): Rename and repackage middleware construction…
walmsles 8501b9a
fix(jsdocs): added docs to MiddlewareStackWrapper and BaseMiddlewareH…
walmsles 0d59e12
fix(types): Mkae MiddlewareStackWrapper __call__ return type more spe…
walmsles 6b9b369
fix(middlewares): internalise registered_api_adapter and remove Cors/…
walmsles 409da32
feat(middlewares): Add chema validation middleware and internalise re…
walmsles 1a90b34
chore(security): relabel http to https for test JSON Schema (because …
walmsles a9d9cb2
Apply suggestions from code review
walmsles 10080b5
chore(typing): Ficup typing and function/attribute scopes - keep priv…
walmsles de7247d
feat(middlewares): Add optional outbound schema dn formats to schema …
walmsles dbae938
fix(errors): add logger for config exceptions and return minimal details
walmsles 13df122
chore(docs): fixup format of docstrings to numpy format
walmsles 8067116
chore(docs): change docstrings to numpy format
walmsles 6ce64f1
fix(tests): fix failing tests due to resposne change:
walmsles 22b83e0
chore(tests): group middleware testing to one module
walmsles af719f4
chore(docs): api_agteway - improve docs for middleware and examples
walmsles 0adfc70
chore(docs): document why mypy 'type: ignore' is used here
walmsles 63db815
feat(api_middleware): add source diagram for middlewares docs
walmsles 3131f3e
fix(tests): fix unreachable code
walmsles 1a20c9e
fix(debug): fix processed middleware stack frame list, cleanup try/ca…
walmsles 48a9462
fix(debug): revert small change to ensure debug noise reduced via han…
walmsles 587348c
chore(comments): cleanup middleware execution
walmsles deabb26
feat(docs): Add docs for event_handler middleware
walmsles fbb36ab
feat(docs): Tidy up middleware docs and add to section to split routes
walmsles d4fc1ba
feat(route): expose matched route instance to Resolver in additional …
walmsles 837613b
fix(resolver): Add 'powertols_route' to additional context
walmsles 9aec250
Merge branch 'develop' into feat/api-middleware
heitorlessa 49537a9
docs: make intro punchy plus intro diagram
heitorlessa d0be0e4
docs: use correlation id as first middleware
heitorlessa 2b6ee0b
docs: add output for completeness
heitorlessa 33cf3ad
docs: grammar
heitorlessa 40b68a0
docs: note that middleware works for any resolver
heitorlessa 7bd0dba
docs: add global middlewares section
heitorlessa 947d0ce
docs: additional ctx for global middlewares order
heitorlessa efee2ae
docs: add early return section
heitorlessa 741f2a5
feat(route): expose route instance in ephemeral context dict
walmsles 388592f
feat(middlewwares): Expand tests to incdlue core gateway types
walmsles af15705
feat(middlewares): Additional Tests for route middleware, added debug…
walmsles bf439e4
feat(middlewares): Tidy up config, add additional context for _path f…
walmsles 80aa67e
Merge branch 'develop' into feat/api-middleware
walmsles 9fb4c6f
chore(docs): updated imges to be svg for middlewares from draw.io - l…
walmsles 06b1d90
chore(example): fix custom middleware example to correct raise of cap…
walmsles 61022be
chore: type middleware callback
heitorlessa 21af597
chore: type middleware response
heitorlessa 0ca6683
docs: improve early return; use kwargs over ctx
heitorlessa 9704939
docs: add handling exceptions section
heitorlessa d166de3
docs: fix media typo
heitorlessa f476f7d
docs: add being a good citizen section
heitorlessa e8a071e
docs: add skeleton for class-based middleware
heitorlessa dd59a7f
Merge branch 'develop' into feat/api-middleware
heitorlessa 1c0977a
chore: test class based middlewares
heitorlessa 7d361b6
docs: rename class based section
heitorlessa 85e65b0
feat(middlewares): remove kwargs from middleware signature for cleane…
walmsles 3a20318
feat(middlewares): align signatures for middlewareprocessing
walmsles 5edde6a
feat(middlewares): cleanup typing for next callbacks
walmsles a0e784b
feat(middlewares): align typing for next_middlewares for consistency
walmsles f20b778
Merge branch 'develop' into feat/api-middleware
heitorlessa d8cf386
chore: use generics to accept any event handler
heitorlessa f5a613a
refactor: tech debt overload on get_header_value for middleware examp…
heitorlessa 2f2eb91
chore: enforce protocol type checking for app instance
heitorlessa 03708bb
docs: complete extending middlewares section
heitorlessa 5dc5719
fix: remove schema validation export due to optional dependency
heitorlessa f7800b2
refactor: improve docstrings for schema validation; typing
heitorlessa 6f63b4f
chore: leftover from previous circular dep issue
heitorlessa 03d15fa
docs: add native middleware section
heitorlessa b7bcb08
docs - refactor references of with kwargs to , remove **lwargs refer…
walmsles 7ca4a3a
chore: add middleware order test
heitorlessa 870545a
refactor: add debug log
heitorlessa 44cb04b
docs: move staging area to router section
heitorlessa 3832817
Merge branch 'develop' into feat/api-middleware
heitorlessa 4e1a654
fix: remove leftover order from middleware order test
heitorlessa 6400b28
Merge branch 'develop' into feat/api-middleware
heitorlessa 19eaa73
middlewares: reverse internal function rename to ensure no breaking c…
walmsles 592d9da
chore(tests): remove typing isues
walmsles d1508c7
docs: middleware in router
heitorlessa aa68e40
chore: last cleanups
heitorlessa 98948ec
docs: leftover to highlight works for micro/mono fns
heitorlessa 20c344a
docs: fix highlighting after refactoring
heitorlessa 4ed0076
chore: remove backup drawio file
heitorlessa 7fbb132
Merge branch 'develop' into feat/api-middleware
leandrodamascena 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
Apply suggestions from code review
Co-authored-by: Heitor Lessa <lessa@amazon.nl> Signed-off-by: walmsles <2704782+walmsles@users.noreply.github.com>
- Loading branch information
commit a9d9cb2b4c9b76b40a3e303f2bf948dd68214b5f
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
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.
Uh oh!
There was an error while loading. Please reload this page.