You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under the hood **Django Ninja** uses [Pydantic Models](https://pydantic-docs.helpmanual.io/usage/models/)
@@ -11,10 +11,11 @@ There are many customizations available for a **Django Ninja `Schema`**, via the
11
11
12
12
## Example Camel Case mode
13
13
14
-
One interesting `Config` attribute is [`alias_generator`](https://pydantic-docs.helpmanual.io/usage/model_config/#alias-generator).
14
+
One interesting config attribute is [`alias_generator`](https://docs.pydantic.dev/latest/api/config/?query=alias_generator#pydantic.config.ConfigDict.alias_generator).
15
15
Using Pydantic's example in **Django Ninja** can look something like:
Copy file name to clipboardExpand all lines: docs/docs/tutorial/other/crud.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -176,14 +176,14 @@ To allow the user to make partial updates, use `payload.dict(exclude_unset=True)
176
176
177
177
**Enforcing strict field validation**
178
178
179
-
By default, any provided fields that don't exist in the schema will be silently ignored. To raise an error for these invalid fields, you can set `extra = "forbid"` in the schema's Config class. For example:
179
+
By default, any provided fields that don't exist in the schema will be silently ignored. To raise an error for these invalid fields, you can set `extra = "forbid"` in the model_config. For example:
0 commit comments