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

docs(parser): APIGatewayProxyEvent to APIGatewayProxyEventModel #1061

Merged
merged 2 commits into from
Mar 7, 2022
Merged

Conversation

darnley
Copy link
Contributor

@darnley darnley commented Mar 7, 2022

Description of changes:

Fix the built-in model that is responsible for parsing events of API Gateway Proxy v1 to Lambda. Someone write that the built-in model is aws_lambda_powertools.utilities.data_classes.APIGatewayProxyEvent, but, in fact, the right model for parsing using event_parser is aws_lambda_powertools.utilities.parser.models.APIGatewayProxyEventModel.

When we try to use the wrong one (APIGatewayProxyEvent) in event_parser, it results in an error since it does not inherits BaseModel from pydantic.

Checklist

Breaking change checklist

RFC issue #:

  • Migration process documented
  • Implement warnings (if it can live side by side)

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


View rendered docs/utilities/parser.md

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 7, 2022
@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Mar 7, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Mar 7, 2022

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.

@heitorlessa heitorlessa changed the title docs: fix wrong built-in model name "APIGatewayProxyEvent" to "APIGatewayProxyEventModel" docs(parser): correct from "APIGatewayProxyEvent" to "APIGatewayProxyEventModel" Mar 7, 2022
@heitorlessa heitorlessa changed the title docs(parser): correct from "APIGatewayProxyEvent" to "APIGatewayProxyEventModel" docs(parser): APIGatewayProxyEvent to APIGatewayProxyEventModel Mar 7, 2022
@heitorlessa
Copy link
Contributor

heitorlessa commented Mar 7, 2022

hey @darnley thank you for helping improve the documentation; it's definitely an oversight we will prevent after moving all snippets to separate files that can be linted.

@heitorlessa heitorlessa merged commit 860b819 into aws-powertools:develop Mar 7, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Mar 7, 2022

Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants