-
Notifications
You must be signed in to change notification settings - Fork 402
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): add JSON string field extension example #1526
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ask to change to code snippet and to make it run as-is
docs/utilities/parser.md
Outdated
When extending a `string` field containing JSON, you need to wrap the field | ||
with [Pydantic's Json Type](https://pydantic-docs.helpmanual.io/usage/types/#json-type): | ||
|
||
```python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you create as a snippet file so it runs as-is?
I'd like to prevent us from getting into where we were before with typos, and customers copying/pasting code that doesn't run
@heitorlessa created two samples and referenced them in the docs, ready for another review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiny fix to make mypy only ignore the assignment error as opposed to any other potential issues. Accepting them and merging it - THANKS A LOT!
Issue number: #1518
Summary
Changes
This PR adds a small tip to the parser documentation, highlighting how to override a string field containing Json.
User experience
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.
View rendered docs/utilities/parser.md