diff --git a/openapi/components/paths.yaml b/openapi/components/paths.yaml index a33ea607..ad50f1a5 100644 --- a/openapi/components/paths.yaml +++ b/openapi/components/paths.yaml @@ -170,6 +170,8 @@ $ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1posts" "/groups/{groupId}/posts/{notificationId}": $ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1posts~1{notificationId}" +"/groups/{groupId}/representation": + $ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1representation" "/groups/{groupId}/requests": $ref: "./paths/groups.yaml#/paths/~1groups~1{groupId}~1requests" "/groups/{groupId}/requests/{userId}": diff --git a/openapi/components/paths/groups.yaml b/openapi/components/paths/groups.yaml index 5c01690d..5bdfbc4e 100644 --- a/openapi/components/paths/groups.yaml +++ b/openapi/components/paths/groups.yaml @@ -880,6 +880,39 @@ paths: $ref: ../responses/groups/GroupNotMemberError.yaml security: - authCookie: [] + '/groups/{groupId}/representation': + parameters: + - $ref: ../parameters.yaml#/groupId + put: + summary: Update Group Representation + description: |- + Updates whether the user is representing the group. + + When `isRepresenting` is set to `true`, this flag will be set to `false` for all other groups + operationId: updateGroupRepresentation + tags: + - groups + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + isRepresenting: + type: boolean + description: Whether the user is representing the group. + required: + - isRepresenting + responses: + '200': + $ref: ../responses/groups/UpdateGroupRepresentationSuccess.yaml + '401': + $ref: ../responses/MissingCredentialsError.yaml + '403': + $ref: ../responses/groups/GroupNotMemberError.yaml + security: + - authCookie: [] '/groups/{groupId}/instances': parameters: - $ref: ../parameters.yaml#/groupId diff --git a/openapi/components/responses/groups/UpdateGroupRepresentationSuccess.yaml b/openapi/components/responses/groups/UpdateGroupRepresentationSuccess.yaml new file mode 100644 index 00000000..f22c1960 --- /dev/null +++ b/openapi/components/responses/groups/UpdateGroupRepresentationSuccess.yaml @@ -0,0 +1,11 @@ +description: Successful response after updating group representation. +content: + application/json: + schema: + $ref: ../../schemas/Success.yaml + examples: + Updated Group Representation: + value: + success: + message: Group representation updated! + status_code: 200