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

refactor(event-handler): Add ResponseBuilder and more docs #412

Merged
merged 7 commits into from
May 1, 2021

Conversation

michaelbrewer
Copy link
Contributor

@michaelbrewer michaelbrewer commented Apr 28, 2021

Issue #, if available:

Description of changes:

Change:

  • Add new ResponseBuilder to replace the Tuple[Route, Response]
  • Refactor code to be easier to maintain
  • Fill in some docs and place holder notes for the main docs page

Checklist

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Change:
- Add new ResponseBuilder to replace the Tuple[Route, Response]
- Refactor code to be easier to maintain
@michaelbrewer
Copy link
Contributor Author

@heitorlessa did some refactoring of the resolve function.

@codecov-commenter
Copy link

codecov-commenter commented Apr 28, 2021

Codecov Report

Merging #412 (634b347) into develop (e24a985) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #412   +/-   ##
========================================
  Coverage    99.89%   99.89%           
========================================
  Files          101      101           
  Lines         3967     3976    +9     
  Branches       198      198           
========================================
+ Hits          3963     3972    +9     
  Misses           1        1           
  Partials         3        3           
Impacted Files Coverage Δ
aws_lambda_powertools/event_handler/api_gateway.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e24a985...634b347. Read the comment docs.

Response(
status_code=404,
content_type="application/json",
body=json.dumps({"message": f"No route found for '{method}.{path}'"}),
Copy link
Contributor

Choose a reason for hiding this comment

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

Note to self: Pull the entire code to check whether we're not making customers vulnerable to data enumeration attacks via HTTP status code

@michaelbrewer michaelbrewer changed the title refactor(event-handler): Add ResponseBuilder refactor(event-handler): Add ResponseBuilder and more docs Apr 29, 2021
@michaelbrewer
Copy link
Contributor Author

@heitorlessa do you want me to add anything else to this?

@michaelbrewer michaelbrewer requested a review from heitorlessa May 1, 2021 06:16
@heitorlessa heitorlessa added area/utilities feature New feature or functionality labels May 1, 2021
@heitorlessa heitorlessa merged commit 51c4c2d into aws-powertools:develop May 1, 2021
@michaelbrewer michaelbrewer deleted the refactor-api-handler branch May 1, 2021 07:05
@heitorlessa heitorlessa added this to the 1.15.0 milestone May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants