From a6d0e5c5ef7188b3f204e4ea7338ea8064237e8a Mon Sep 17 00:00:00 2001 From: Rexios Date: Mon, 20 Jan 2025 21:47:13 -0500 Subject: [PATCH] Fixes group permissions enum arrays --- .../requests/CreateGroupRoleRequest.yaml | 6 +- .../requests/UpdateGroupRoleRequest.yaml | 4 +- openapi/components/schemas/GroupMyMember.yaml | 4 +- .../components/schemas/GroupPermissions.yaml | 105 +++++++++--------- openapi/components/schemas/GroupRole.yaml | 4 +- 5 files changed, 64 insertions(+), 59 deletions(-) diff --git a/openapi/components/requests/CreateGroupRoleRequest.yaml b/openapi/components/requests/CreateGroupRoleRequest.yaml index eb71ee07..7dd147a8 100644 --- a/openapi/components/requests/CreateGroupRoleRequest.yaml +++ b/openapi/components/requests/CreateGroupRoleRequest.yaml @@ -11,6 +11,6 @@ properties: type: boolean default: false permissions: - $ref: ../schemas/GroupPermissions.yaml - - + type: array + items: + $ref: ../schemas/GroupPermissions.yaml diff --git a/openapi/components/requests/UpdateGroupRoleRequest.yaml b/openapi/components/requests/UpdateGroupRoleRequest.yaml index 3ee23118..a1b56a5b 100644 --- a/openapi/components/requests/UpdateGroupRoleRequest.yaml +++ b/openapi/components/requests/UpdateGroupRoleRequest.yaml @@ -9,6 +9,8 @@ properties: type: boolean default: false permissions: - $ref: ../schemas/GroupPermissions.yaml + type: array + items: + $ref: ../schemas/GroupPermissions.yaml order: type: integer diff --git a/openapi/components/schemas/GroupMyMember.yaml b/openapi/components/schemas/GroupMyMember.yaml index bc6b0009..b5c0d328 100644 --- a/openapi/components/schemas/GroupMyMember.yaml +++ b/openapi/components/schemas/GroupMyMember.yaml @@ -55,4 +55,6 @@ properties: items: type: string permissions: - $ref: ./GroupPermissions.yaml + type: array + items: + $ref: ./GroupPermissions.yaml diff --git a/openapi/components/schemas/GroupPermissions.yaml b/openapi/components/schemas/GroupPermissions.yaml index 9028b856..37143ef4 100644 --- a/openapi/components/schemas/GroupPermissions.yaml +++ b/openapi/components/schemas/GroupPermissions.yaml @@ -1,53 +1,52 @@ -type: array -items: - type: string - enum: - - \* - - group-announcement-manage - - group-audit-view - - group-bans-manage - - group-data-manage - - group-default-role-manage - - group-galleries-manage - - group-instance-age-gated-create - - group-instance-join - - group-instance-manage - - group-instance-moderate - - group-instance-open-create - - group-instance-plus-create - - group-instance-plus-portal - - group-instance-plus-portal-unlocked - - group-instance-public-create - - group-instance-queue-priority - - group-instance-restricted-create - - group-invites-manage - - group-members-manage - - group-members-remove - - group-members-viewall - - group-roles-assign - - group-roles-manage - x-enum-varnames: - - group_all - - group_announcement_manage - - group_audit_view - - group_bans_manage - - group_data_manage - - group_default_role_manage - - group_galleries_manage - - group_instance_age_gated_create - - group_instance_join - - group_instance_manage - - group_instance_moderate - - group_instance_open_create - - group_instance_plus_create - - group_instance_plus_portal - - group_instance_plus_portal_unlocked - - group_instance_public_create - - group_instance_queue_priority - - group_instance_restricted_create - - group_invites_manage - - group_members_manage - - group_members_remove - - group_members_viewall - - group_roles_assign - - group_roles_manage +title: GroupPermissions +type: string +enum: + - \* + - group-announcement-manage + - group-audit-view + - group-bans-manage + - group-data-manage + - group-default-role-manage + - group-galleries-manage + - group-instance-age-gated-create + - group-instance-join + - group-instance-manage + - group-instance-moderate + - group-instance-open-create + - group-instance-plus-create + - group-instance-plus-portal + - group-instance-plus-portal-unlocked + - group-instance-public-create + - group-instance-queue-priority + - group-instance-restricted-create + - group-invites-manage + - group-members-manage + - group-members-remove + - group-members-viewall + - group-roles-assign + - group-roles-manage +x-enum-varnames: + - group_all + - group_announcement_manage + - group_audit_view + - group_bans_manage + - group_data_manage + - group_default_role_manage + - group_galleries_manage + - group_instance_age_gated_create + - group_instance_join + - group_instance_manage + - group_instance_moderate + - group_instance_open_create + - group_instance_plus_create + - group_instance_plus_portal + - group_instance_plus_portal_unlocked + - group_instance_public_create + - group_instance_queue_priority + - group_instance_restricted_create + - group_invites_manage + - group_members_manage + - group_members_remove + - group_members_viewall + - group_roles_assign + - group_roles_manage diff --git a/openapi/components/schemas/GroupRole.yaml b/openapi/components/schemas/GroupRole.yaml index b798966a..643dc2aa 100644 --- a/openapi/components/schemas/GroupRole.yaml +++ b/openapi/components/schemas/GroupRole.yaml @@ -13,7 +13,9 @@ properties: type: boolean default: false permissions: - $ref: ./GroupPermissions.yaml + type: array + items: + $ref: ./GroupPermissions.yaml isManagementRole: type: boolean default: false