Skip to content

docs(parser): Removed unused import, added typing imports, fixed typo in example. #774

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 1 commit into from
Oct 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/utilities/parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ Use the decorator for fail fast scenarios where you want your Lambda function to
=== "event_parser_decorator.py"

```python hl_lines="18"
from aws_lambda_powertools.utilities.parser import event_parser, BaseModel, ValidationError
from aws_lambda_powertools.utilities.parser import event_parser, BaseModel
from aws_lambda_powertools.utilities.typing import LambdaContext
from typing import List, Optional

import json

Expand All @@ -80,7 +81,7 @@ Use the decorator for fail fast scenarios where you want your Lambda function to
print(event.description)
print(event.items)

order_items = [items for item in event.items]
order_items = [item for item in event.items]
...

payload = {
Expand All @@ -107,6 +108,7 @@ Use this standalone function when you want more control over the data validation

```python hl_lines="21 30"
from aws_lambda_powertools.utilities.parser import parse, BaseModel, ValidationError
from typing import List, Optional

class OrderItem(BaseModel):
id: int
Expand Down