File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
packages/models-library/src/models_library Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 33"""
44
55from enum import Enum
6+ from typing import Annotated
67
78from pydantic import BaseModel , ConfigDict , Field
89
@@ -20,15 +21,15 @@ class AccessEnum(str, Enum):
2021
2122
2223class AccessRights (BaseModel ):
23- read : bool = Field (..., description = "has read access" )
24- write : bool = Field (..., description = "has write access" )
25- delete : bool = Field (..., description = "has deletion rights" )
24+ read : Annotated [ bool , Field (description = "has read access" )]
25+ write : Annotated [ bool , Field (description = "has write access" )]
26+ delete : Annotated [ bool , Field (description = "has deletion rights" )]
2627
2728 model_config = ConfigDict (extra = "forbid" )
2829
2930
3031class Owner (BaseModel ):
31- user_id : UserID = Field (..., description = "Owner's user id" )
32+ user_id : Annotated [ UserID , Field (description = "Owner's user id" )]
3233
3334 model_config = ConfigDict (
3435 extra = "forbid" ,
You can’t perform that action at this time.
0 commit comments