From 4f0927dfbcf105aa8b853d6255b4a65875404cb9 Mon Sep 17 00:00:00 2001 From: juancarmore Date: Wed, 27 Aug 2025 20:45:10 +0200 Subject: [PATCH] openapi: adjust updateParticipantRole endpoint to use put method and /role in path --- ...l => update-participant-role-request.yaml} | 0 ...l => success-update-participant-role.yaml} | 2 +- .../openapi/openvidu-meet-internal-api.yaml | 2 + backend/openapi/paths/internal/meetings.yaml | 59 +++++++++---------- 4 files changed, 32 insertions(+), 31 deletions(-) rename backend/openapi/components/requestBodies/internal/{update-participant-request.yaml => update-participant-role-request.yaml} (100%) rename backend/openapi/components/responses/internal/{success-update-participant.yaml => success-update-participant-role.yaml} (82%) diff --git a/backend/openapi/components/requestBodies/internal/update-participant-request.yaml b/backend/openapi/components/requestBodies/internal/update-participant-role-request.yaml similarity index 100% rename from backend/openapi/components/requestBodies/internal/update-participant-request.yaml rename to backend/openapi/components/requestBodies/internal/update-participant-role-request.yaml diff --git a/backend/openapi/components/responses/internal/success-update-participant.yaml b/backend/openapi/components/responses/internal/success-update-participant-role.yaml similarity index 82% rename from backend/openapi/components/responses/internal/success-update-participant.yaml rename to backend/openapi/components/responses/internal/success-update-participant-role.yaml index 68374b1..dea7737 100644 --- a/backend/openapi/components/responses/internal/success-update-participant.yaml +++ b/backend/openapi/components/responses/internal/success-update-participant-role.yaml @@ -1,4 +1,4 @@ -description: Successfully updated participant +description: Successfully updated participant role content: application/json: schema: diff --git a/backend/openapi/openvidu-meet-internal-api.yaml b/backend/openapi/openvidu-meet-internal-api.yaml index 3db313d..107ea3c 100644 --- a/backend/openapi/openvidu-meet-internal-api.yaml +++ b/backend/openapi/openvidu-meet-internal-api.yaml @@ -46,6 +46,8 @@ paths: $ref: './paths/internal/meetings.yaml#/~1meetings~1{roomId}' /meetings/{roomId}/participants/{participantIdentity}: $ref: './paths/internal/meetings.yaml#/~1meetings~1{roomId}~1participants~1{participantIdentity}' + /meetings/{roomId}/participants/{participantIdentity}/role: + $ref: './paths/internal/meetings.yaml#/~1meetings~1{roomId}~1participants~1{participantIdentity}~1role' components: securitySchemes: diff --git a/backend/openapi/paths/internal/meetings.yaml b/backend/openapi/paths/internal/meetings.yaml index 4a50496..e08c47d 100644 --- a/backend/openapi/paths/internal/meetings.yaml +++ b/backend/openapi/paths/internal/meetings.yaml @@ -27,35 +27,6 @@ '500': $ref: '../../components/responses/internal-server-error.yaml' /meetings/{roomId}/participants/{participantIdentity}: - patch: - operationId: updateParticipant - summary: Update participant in a meeting - description: > - Updates the properties of a participant in the current meeting in an OpenVidu Meet room. - This can be used to change the participant role. - tags: - - Internal API - Meetings - security: - - participantTokenCookie: [] - parameters: - - $ref: '../../components/parameters/room-id-path.yaml' - - $ref: '../../components/parameters/internal/participant-identity.yaml' - - $ref: '../../components/parameters/internal/x-participant-role.yaml' - requestBody: - $ref: '../../components/requestBodies/internal/update-participant-request.yaml' - responses: - '200': - $ref: '../../components/responses/internal/success-update-participant.yaml' - '400': - $ref: '../../components/responses/internal/error-invalid-participant-role.yaml' - '401': - $ref: '../../components/responses/unauthorized-error.yaml' - '403': - $ref: '../../components/responses/forbidden-error.yaml' - '404': - $ref: '../../components/responses/internal/error-room-participant-not-found.yaml' - '500': - $ref: '../../components/responses/internal-server-error.yaml' delete: operationId: kickParticipant summary: Kick a participant from a meeting @@ -82,4 +53,32 @@ $ref: '../../components/responses/internal/error-room-participant-not-found.yaml' '500': $ref: '../../components/responses/internal-server-error.yaml' - +/meetings/{roomId}/participants/{participantIdentity}/role: + put: + operationId: updateParticipantRole + summary: Update participant role in a meeting + description: > + Updates the role of a participant in the current meeting in an OpenVidu Meet room. + tags: + - Internal API - Meetings + security: + - participantTokenCookie: [] + parameters: + - $ref: '../../components/parameters/room-id-path.yaml' + - $ref: '../../components/parameters/internal/participant-identity.yaml' + - $ref: '../../components/parameters/internal/x-participant-role.yaml' + requestBody: + $ref: '../../components/requestBodies/internal/update-participant-role-request.yaml' + responses: + '200': + $ref: '../../components/responses/internal/success-update-participant-role.yaml' + '400': + $ref: '../../components/responses/internal/error-invalid-participant-role.yaml' + '401': + $ref: '../../components/responses/unauthorized-error.yaml' + '403': + $ref: '../../components/responses/forbidden-error.yaml' + '404': + $ref: '../../components/responses/internal/error-room-participant-not-found.yaml' + '500': + $ref: '../../components/responses/internal-server-error.yaml'