Skip to content

Commit

Permalink
updates OAS
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Dec 9, 2024
1 parent de333e3 commit 0f9e09a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,24 @@ class GroupUserAdd(InputSchema):
"""

uid: UserID | None = None
email: LowerCaseEmailStr | None = None
email: Annotated[
LowerCaseEmailStr | None,
Field(
description="Accessible only if the user has opted to share their email in privacy settings"
),
] = None

_check_uid_or_email = model_validator(mode="after")(
create__check_only_one_is_set__root_validator(["uid", "email"])
)

model_config = ConfigDict(
json_schema_extra={"examples": [{"uid": 42}, {"email": "[email protected]"}]}
json_schema_extra={
"examples": [
{"uid": 42},
{"email": "[email protected]"},
]
}
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9786,6 +9786,8 @@ components:
format: email
- type: 'null'
title: Email
description: Accessible only if the user has opted to share their email
in privacy settings
type: object
title: GroupUserAdd
description: "Identify the user with either `email` or `uid` \u2014 only one."
Expand All @@ -9797,41 +9799,48 @@ components:
- type: 'null'
title: Id
description: the user id
userName:
type: string
maxLength: 100
minLength: 1
title: Username
gid:
anyOf:
- type: string
- type: 'null'
title: Gid
description: the user primary gid
login:
anyOf:
- type: string
format: email
- type: 'null'
title: Login
description: the user login email
description: the user's email, if privacy settings allows
first_name:
anyOf:
- type: string
- type: 'null'
title: First Name
description: the user first name
description: If privacy settings allows
last_name:
anyOf:
- type: string
- type: 'null'
title: Last Name
description: the user last name
description: If privacy settings allows
gravatar_id:
anyOf:
- type: string
- type: 'null'
title: Gravatar Id
description: the user gravatar id hash
gid:
anyOf:
- type: string
- type: 'null'
title: Gid
description: the user primary gid
deprecated: true
accessRights:
$ref: '#/components/schemas/GroupAccessRights'
type: object
required:
- userName
- accessRights
title: GroupUserGet
example:
Expand Down

0 comments on commit 0f9e09a

Please sign in to comment.