Skip to content

Commit

Permalink
docs(parser): improve documentation with Pydantic best practices (#5925)
Browse files Browse the repository at this point in the history
* docs: improve the doc for the customer from v2 library.

* docs: improve the doc from PR

Co-authored-by: Leandro Damascena <lcdama@amazon.pt>
Signed-off-by: Alpha <AlphaWong@users.noreply.github.com>

---------

Signed-off-by: Alpha <AlphaWong@users.noreply.github.com>
Co-authored-by: Leandro Damascena <lcdama@amazon.pt>
  • Loading branch information
AlphaWong and leandrodamascena authored Jan 27, 2025
1 parent b84a9b2 commit 6baeec4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/utilities/parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ If you run using a test event `{"message": "hello universe"}` you should expect

`model_validator` can help when you have a complex validation mechanism. For example finding whether data has been omitted or comparing field values.

!!! tip "If you are still using the deprecated `root_validator` function, switch to `model_validator` for the latest Pydantic functionality."

```python title="model_validator.py" hl_lines="1 12-17"
--8<-- "examples/parser/src/model_validator.py"
```
Expand Down

0 comments on commit 6baeec4

Please sign in to comment.