diff --git a/openapi/components/paths.yaml b/openapi/components/paths.yaml index 83b8489f..52c17be9 100644 --- a/openapi/components/paths.yaml +++ b/openapi/components/paths.yaml @@ -132,6 +132,8 @@ "/groups": $ref: "./paths/groups.yaml#/paths/~1groups" +"/groups/roleTemplates": + $ref: "./paths/groups.yaml#/paths/~1groups~1roleTemplates" "/groups/{groupId}": $ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}" "/groups/{groupId}/announcement": diff --git a/openapi/components/paths/favorites.yaml b/openapi/components/paths/favorites.yaml index e63330b1..33545fd9 100644 --- a/openapi/components/paths/favorites.yaml +++ b/openapi/components/paths/favorites.yaml @@ -108,6 +108,7 @@ paths: parameters: - $ref: ../parameters.yaml#/number - $ref: ../parameters.yaml#/offset + - $ref: ../parameters.yaml#/userIdAdmin - schema: type: string in: query diff --git a/openapi/components/paths/groups.yaml b/openapi/components/paths/groups.yaml index 5c01690d..d909b42a 100644 --- a/openapi/components/paths/groups.yaml +++ b/openapi/components/paths/groups.yaml @@ -44,6 +44,20 @@ paths: $ref: ../responses/MissingCredentialsError.yaml security: - authCookie: [] + /groups/roleTemplates: + get: + summary: Get Group Role Templates + description: Obtain predefined templates for group roles + operationId: getGroupRoleTemplates + tags: + - groups + responses: + '200': + $ref: ../responses/groups/GroupRoleTemplatesResponse.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + security: + - authCookie: [] '/groups/{groupId}': parameters: - $ref: ../parameters.yaml#/groupId diff --git a/openapi/components/responses/groups/GroupRoleTemplatesResponse.yaml b/openapi/components/responses/groups/GroupRoleTemplatesResponse.yaml new file mode 100644 index 00000000..f4623e1e --- /dev/null +++ b/openapi/components/responses/groups/GroupRoleTemplatesResponse.yaml @@ -0,0 +1,7 @@ +description: Returns a dictionary of GroupRoleTemplate objects. +content: + application/json: + schema: + type: object + additionalProperties: + $ref: ../../schemas/GroupRoleTemplateValues.yaml diff --git a/openapi/components/schemas/GroupRoleTemplateValues.yaml b/openapi/components/schemas/GroupRoleTemplateValues.yaml new file mode 100644 index 00000000..d6e431e0 --- /dev/null +++ b/openapi/components/schemas/GroupRoleTemplateValues.yaml @@ -0,0 +1,30 @@ +title: GroupRoleTemplateValues +type: object +properties: + basePermissions: + type: array + items: + $ref: ./GroupPermissions.yaml + description: + type: string + name: + type: string + roles: + type: object + properties: + description: + type: string + name: + type: string + basePermissions: + type: array + items: + $ref: ./GroupPermissions.yaml + isAddedOnJoin: + type: boolean + default: false +required: + - basePermissions + - description + - name + - roles