openapi: Reorder group-setting-value oneOf clause.

This commit is contained in:
Vector73 2024-06-25 09:11:41 +05:30 committed by Tim Abbott
parent b285e631e9
commit 6aa3a55796
2 changed files with 4 additions and 4 deletions

View File

@ -20596,6 +20596,9 @@ components:
[mentions]: /help/mention-a-user-or-group [mentions]: /help/mention-a-user-or-group
GroupSettingValue: GroupSettingValue:
oneOf: oneOf:
- type: integer
description: |
The ID of the [user group](/help/user-groups) with this permission.
- type: object - type: object
additionalProperties: false additionalProperties: false
properties: properties:
@ -20613,9 +20616,6 @@ components:
type: integer type: integer
description: | description: |
An object with these fields: An object with these fields:
- type: integer
description: |
The ID of the [user group](/help/user-groups) with this permission.
Invite: Invite:
type: object type: object
description: | description: |

View File

@ -58,7 +58,7 @@ def add_user_group(
name: str, name: str,
members: Json[Sequence[int]], members: Json[Sequence[int]],
description: str, description: str,
can_mention_group: Optional[Json[Union[AnonymousSettingGroupDict, int]]] = None, can_mention_group: Optional[Json[Union[int, AnonymousSettingGroupDict]]] = None,
) -> HttpResponse: ) -> HttpResponse:
user_profiles = user_ids_to_users(members, user_profile.realm) user_profiles = user_ids_to_users(members, user_profile.realm)
name = check_user_group_name(name) name = check_user_group_name(name)