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
Update alias documentation #3680
Conversation
Add usage example for schema field customization alias
As its a documentation change, test cases aren't required. |
please 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.
This is definitely needed, thank you.
Needs some changes:
- needs a whole new section to describe
alias
- we need to add docs on the effect of alias with
.dict()
and.json()
@@ -61,7 +61,12 @@ It has the following arguments: | |||
* `default_factory`: a zero-argument callable that will be called when a default value is needed for this field. | |||
Among other purposes, this can be used to set dynamic default values. | |||
It is forbidden to set both `default` and `default_factory`. | |||
* `alias`: the public name of the field | |||
* `alias`: the public name of the field. The name maps to a field during initialization. |
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.
this will break the bullet points, we should add a whole new section (probably not in schema.py
) to document alias.
please update. |
Need your input here.
|
Sorry for the slow reply, in please update. |
No reply, closing. Let me know if you'd like me to re-open this. |
Change Summary
Add usage example for schema field customization alias
Update documentation verbose and add example for using alias
Related issue number
fix #1681
Checklist
changes/<pull request or issue id>-<github username>.md
file added describing change(see changes/README.md for details)