Skip to content

Commit 23659e9

Browse files
committed
@pcrespov review: use prompt
1 parent 6814875 commit 23659e9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/models-library/src/models_library/projects_access.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44

55
from enum import Enum
6+
from typing import Annotated
67

78
from pydantic import BaseModel, ConfigDict, Field
89

@@ -20,15 +21,15 @@ class AccessEnum(str, Enum):
2021

2122

2223
class 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

3031
class 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",

0 commit comments

Comments
 (0)