Skip to content

Commit 243ad48

Browse files
committed
types
1 parent 046c628 commit 243ad48

File tree

1 file changed

+7
-7
lines changed
  • packages/models-library/src/models_library/api_schemas_webserver

1 file changed

+7
-7
lines changed

packages/models-library/src/models_library/api_schemas_webserver/groups.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
model_validator,
1515
)
1616

17-
from ..basic_types import IDStr
1817
from ..emails import LowerCaseEmailStr
1918
from ..groups import (
2019
AccessRightsDict,
2120
Group,
21+
GroupID,
2222
GroupMember,
2323
StandardGroupCreate,
2424
StandardGroupUpdate,
2525
)
26-
from ..users import UserID
26+
from ..users import UserID, UserNameID
2727
from ..utils.common_validators import create__check_only_one_is_set__root_validator
2828
from ._base import InputSchema, OutputSchema
2929

@@ -55,7 +55,7 @@ class GroupAccessRights(BaseModel):
5555

5656

5757
class GroupGet(OutputSchema):
58-
gid: int = Field(..., description="the group ID")
58+
gid: GroupID = Field(..., description="the group ID")
5959
label: str = Field(..., description="the group name")
6060
description: str = Field(..., description="the group description")
6161
thumbnail: AnyUrl | None = Field(
@@ -229,11 +229,11 @@ class GroupUserGet(BaseModel):
229229

230230
# Identifiers
231231
id: Annotated[
232-
str | None, Field(description="the user id", coerce_numbers_to_str=True)
232+
UserID | None, Field(description="the user id", coerce_numbers_to_str=True)
233233
] = None
234-
user_name: Annotated[IDStr, Field(alias="userName")]
234+
user_name: Annotated[UserNameID, Field(alias="userName")]
235235
gid: Annotated[
236-
str | None,
236+
GroupID | None,
237237
Field(description="the user primary gid", coerce_numbers_to_str=True),
238238
] = None
239239

@@ -296,7 +296,7 @@ class GroupUserAdd(InputSchema):
296296
"""
297297

298298
uid: UserID | None = None
299-
user_name: Annotated[IDStr | None, Field(alias="userName")] = None
299+
user_name: Annotated[UserNameID | None, Field(alias="userName")] = None
300300
email: Annotated[
301301
LowerCaseEmailStr | None,
302302
Field(

0 commit comments

Comments
 (0)