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
Copy file name to clipboardExpand all lines: README.md
+5-8Lines changed: 5 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Starting version `0.13.4`, Ninja schema will support both v1 and v2 of pydantic
16
16
Python >= 3.8
17
17
django >= 3
18
18
pydantic >= 1.6
19
-
19
+
20
20
**Key features:**
21
21
-**Custom Field Support**: Ninja Schema converts django model to native pydantic types which gives you quick field validation out of the box. eg Enums, email, IPAddress, URLs, JSON, etc
22
22
-**Field Validator**: Fields can be validated with **model_validator** just like pydantic **[validator](https://pydantic-docs.helpmanual.io/usage/validators/)** or **[root_validator](https://pydantic-docs.helpmanual.io/usage/validators/)**.
@@ -63,7 +63,6 @@ class CreateUserSchema(ModelSchema):
63
63
## `from_orm(cls, obj: Any)`
64
64
You can generate a schema instance from your django model instance
65
65
```Python
66
-
from typings import Optional
67
66
from django.contrib.auth import get_user_model
68
67
from ninja_schema import ModelSchema, model_validator
0 commit comments