Skip to content

docs(parser): fix highlighted line #2064

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
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
4 changes: 2 additions & 2 deletions docs/utilities/parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Use the decorator for fail fast scenarios where you want your Lambda function to
???+ note
**This decorator will replace the `event` object with the parsed model if successful**. This means you might be careful when nesting other decorators that expect `event` to be a `dict`.

```python hl_lines="18" title="Parsing and validating upon invocation with event_parser decorator"
```python hl_lines="19" title="Parsing and validating upon invocation with event_parser decorator"
from aws_lambda_powertools.utilities.parser import event_parser, BaseModel
from aws_lambda_powertools.utilities.typing import LambdaContext
from typing import List, Optional
Expand Down Expand Up @@ -111,7 +111,7 @@ handler(event=json.dumps(payload), context=LambdaContext()) # also works if even

Use this standalone function when you want more control over the data validation process, for example returning a 400 error for malformed payloads.

```python hl_lines="21 30" title="Using standalone parse function for more flexibility"
```python hl_lines="21 31" title="Using standalone parse function for more flexibility"
from aws_lambda_powertools.utilities.parser import parse, BaseModel, ValidationError
from typing import List, Optional

Expand Down