fix(parser): Make ApiGateway version, authorizer fields optional#532
fix(parser): Make ApiGateway version, authorizer fields optional#532heitorlessa merged 1 commit intoaws-powertools:developfrom walmsles:fix/make-version-authorizer-optional-for-apigw-proxy-model
Conversation
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
|
Thank you so much @walmsles ! Question: What's the type of API Gateway integration that makes this necessary? In other words, how did you hit this issue? |
|
@heitorlessa I created a simple API using LAMBDA_PROXY integration that was very basic - no authentication just default setup for a quick POC test playing around with powertools and parser to see how it works, behaves. I have also come across this problem setting up sample events using:
I used serverless framework to push the API up to my AWS account. |
|
Thanks a lot again @walmsles - Merging this now. I've just tried deploying an API GW and I don't see those fields in the request too, so either we used an incorrect event or this changed -- hard to know the latter as there isn't an official schema yet. cc @risenberg-cyberark -- I'll create an issue to create infrastructure for integ test so we can prevent this from happening in the future. |
Codecov Report
@@ Coverage Diff @@
## develop #532 +/- ##
========================================
Coverage 99.23% 99.23%
========================================
Files 113 113
Lines 4468 4468
Branches 243 243
========================================
Hits 4434 4434
Misses 22 22
Partials 12 12
Continue to review full report at Codecov.
|
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
* develop: chore(deps): bump boto3 from 1.18.0 to 1.18.1 (aws-powertools#528) fix(tracer): mypy generic to preserve decorated method signature (aws-powertools#529) fix(parser): Make ApiGateway version, authorizer fields optional (aws-powertools#532) fix(mypy): fixes to resolve no implicit optional errors (aws-powertools#521) chore(deps): bump boto3 from 1.17.110 to 1.18.0 (aws-powertools#527) feat(feat-toggle): New simple feature toggles rule engine (WIP) (aws-powertools#494) chore(deps-dev): bump mkdocs-material from 7.1.9 to 7.1.10 (aws-powertools#522) chore(deps): bump boto3 from 1.17.102 to 1.17.110 (aws-powertools#523) chore(deps-dev): bump isort from 5.9.1 to 5.9.2 (aws-powertools#514) feat(mypy): add mypy support to makefile (aws-powertools#508) feat(api-gateway): add debug mode (aws-powertools#507)
…ent-subclass * develop: fix(api-gateway): non-greedy route pattern regex (aws-powertools#533) chore(deps): bump boto3 from 1.18.0 to 1.18.1 (aws-powertools#528) fix(tracer): mypy generic to preserve decorated method signature (aws-powertools#529) fix(parser): Make ApiGateway version, authorizer fields optional (aws-powertools#532) fix(mypy): fixes to resolve no implicit optional errors (aws-powertools#521) chore(deps): bump boto3 from 1.17.110 to 1.18.0 (aws-powertools#527)
**Issue #531 **
Description of changes:
Change to APIGatewayProxyEventModel to make "version" Optional
Change to APIGatewayEventRequestContext to make "authorizer" Optional
Checklist
Breaking change checklist
RFC issue #:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.