backend: Refactor bulk deletion responses to clarify operation results and update descriptions

This commit is contained in:
Carlos Santos 2025-04-14 17:57:43 +02:00
parent c3fa764534
commit b08e0e34c4
3 changed files with 32 additions and 36 deletions

View File

@ -1,4 +1,4 @@
description: Bulk deletion completed. Includes lists of successfully deleted IDs and marked for deletion IDs. description: Mixed results for bulk deletion operation
content: content:
application/json: application/json:
schema: schema:
@ -8,39 +8,16 @@ content:
type: array type: array
items: items:
type: string type: string
description: List of successfully deleted rooms IDs. description: List of rooms that were deleted immediately
example: markedForDeletion:
- 'room-123'
- 'room-456'
markedAsDeleted:
type: array type: array
items: items:
type: string type: string
description: List of rooms that were marked for deletion but not actually deleted. The rooms will be deleted when all participants leave the room. description: List of rooms that were marked for deletion but not actually deleted. The rooms will be deleted when all participants leave the room.
example: example:
- 'room-789'
- 'room-101'
examples:
successful_deletion:
summary: All rooms were successfully deleted
value:
deleted: deleted:
- 'room-123' - 'room-123'
- 'room-456' - 'room-456'
markedAsDeleted: [] markedForDeletion:
partial_deletion:
summary: Some rooms were deleted successfully, others were marked for deletion
value:
deleted:
- 'room-123'
- 'room-456'
markedAsDeleted:
- 'room-789'
- 'room-101'
no_deletion_performed:
summary: No rooms were deleted
value:
deleted: []
markedAsDeleted:
- 'room-789' - 'room-789'
- 'room-101' - 'room-101'

View File

@ -1,4 +1,4 @@
description: Room deletion accepted. The room will be deleted when all participants leave. description: All specified rooms have been marked for deletion.
content: content:
application/json: application/json:
schema: schema:
@ -6,4 +6,15 @@ content:
properties: properties:
message: message:
type: string type: string
example: 'Room marked for deletion' markedForDeletion:
type: array
items:
type: string
example:
- room-123
- room-456
example:
message: Rooms room-123, room-456 marked for deletion
markedForDeletion:
- room-123
- room-456

View File

@ -69,11 +69,19 @@
- $ref: '../components/parameters/force-deletion.yaml' - $ref: '../components/parameters/force-deletion.yaml'
responses: responses:
'200': '200':
description: >
**Mixed results**. Some rooms were deleted immediately while others were
marked for deletion (due to active participants).
$ref: '../components/responses/success-bulk-delete-rooms.yaml' $ref: '../components/responses/success-bulk-delete-rooms.yaml'
'202': '202':
description: >
All specified rooms were marked for deletion (due to active participants)
and will be removed once all participants leave.
$ref: '../components/responses/success-room-marked-for-deletion.yaml' $ref: '../components/responses/success-room-marked-for-deletion.yaml'
'204': '204':
description: Successfully deleted the OpenVidu Meet room description: >
All specified rooms were successfully deleted immediately.
No content is returned in the response body.
'401': '401':
$ref: '../components/responses/unauthorized-error.yaml' $ref: '../components/responses/unauthorized-error.yaml'
'403': '403':