Skip to content
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 django-pydantic-create-schema.md #1043

Merged
merged 1 commit into from
Jan 14, 2024
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
2 changes: 1 addition & 1 deletion docs/docs/guides/response/django-pydantic-create-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This is a more advanced (and less safe) method - please use it carefully.
def create_schema(
model, # django model
name = "", # name for the generated class, if empty model names is used
depth = 0, # if > 0 schema will be also created for the nested ForeignKeys and Many2Many (with the provided depth of lookup)
depth = 0, # if > 0 schema will also be created for the nested ForeignKeys and Many2Many (with the provided depth of lookup)
fields: list[str] = None, # if passed - ONLY these fields will added to schema
exclude: list[str] = None, # if passed - these fields will be excluded from schema
optional_fields: list[str] | str = None, # if passed - these fields will not be required on schema (use '__all__' to mark ALL fields required)
Expand Down