backend: update success response schema for room deletion to improve clarity and structure

This commit is contained in:
CSantosM 2026-02-12 15:18:33 +01:00
parent 28f4bf6b38
commit f6dd80e8eb
3 changed files with 227 additions and 76 deletions

View File

@ -2,41 +2,183 @@ description: All specified rooms were successfully processed for deletion.
content:
application/json:
schema:
type: object
properties:
message:
type: string
successful:
type: array
items:
type: object
properties:
successCode:
type: string
enum:
- room_deleted
- room_with_active_meeting_deleted
- room_with_active_meeting_scheduled_to_be_deleted
- room_and_recordings_deleted
- room_closed
- room_with_active_meeting_and_recordings_deleted
- room_with_active_meeting_closed
- room_with_active_meeting_and_recordings_scheduled_to_be_deleted
- room_with_active_meeting_scheduled_to_be_closed
description: A code representing the success scenario
message:
type: string
description: A message providing additional context about the success
room:
allOf:
- $ref: '../schemas/meet-room.yaml'
- type: object
properties:
_extraFields:
type: array
description: >
List of extra fields that can be included in the response based on the `X-ExtraFields` header or `extraFields` query parameter.
items:
type: string
example: config
description: List of rooms that were successfully processed for deletion
oneOf:
- type: object
properties:
message:
type: string
successful:
type: array
items:
type: object
properties:
successCode:
type: string
enum:
- room_closed
- room_with_active_meeting_scheduled_to_be_deleted
- room_with_active_meeting_closed
- room_with_active_meeting_and_recordings_scheduled_to_be_deleted
- room_with_active_meeting_scheduled_to_be_closed
description: A code representing the success scenario
message:
type: string
description: A message providing additional context about the success
room:
allOf:
- $ref: '../schemas/meet-room.yaml'
- type: object
properties:
_extraFields:
type: array
description: >
List of extra fields that can be included in the response based on the `X-ExtraFields` header or `extraFields` query parameter.
items:
type: string
example: config
description: List of rooms that were successfully processed for deletion
- type: object
properties:
message:
type: string
successful:
type: array
items:
type: object
properties:
successCode:
type: string
enum:
- room_deleted
- room_with_active_meeting_deleted
- room_and_recordings_deleted
- room_with_active_meeting_and_recordings_deleted
description: A code representing the success scenario
message:
type: string
description: A message providing additional context about the success
examples:
room_closed:
summary: Room closed successfully
value:
message: 'Bulk deletion request processed successfully'
successful:
- successCode: room_closed
message: 'Room closed successfully'
room:
roomId: 'room-123'
roomName: 'room'
owner: 'alice_smith'
creationDate: 1620000000000
autoDeletionDate: null
autoDeletionPolicy:
withMeeting: when_meeting_ends
withRecordings: close
accessUrl: 'http://localhost:6080/room/room-123'
status: closed
meetingEndAction: none
room_with_active_meeting_scheduled_to_be_deleted:
summary: Room with active meeting scheduled to be deleted
value:
message: 'Bulk deletion request processed successfully'
successful:
- successCode: room_with_active_meeting_scheduled_to_be_deleted
message: 'Room has an active meeting. Scheduled to be deleted when the meeting ends'
room:
roomId: 'room-456'
roomName: 'meeting-room'
owner: 'bob_jones'
creationDate: 1620000000000
autoDeletionDate: null
autoDeletionPolicy:
withMeeting: when_meeting_ends
withRecordings: close
accessUrl: 'http://localhost:6080/room/room-456'
status: active_meeting
meetingEndAction: delete
room_with_active_meeting_closed:
summary: Room with active meeting closed
value:
message: 'Bulk deletion request processed successfully'
successful:
- successCode: room_with_active_meeting_closed
message: 'Room has an active meeting and recordings. Room closed instead of deleted'
room:
roomId: 'room-789'
roomName: 'webinar-room'
owner: 'charlie_brown'
creationDate: 1620000000000
autoDeletionDate: null
autoDeletionPolicy:
withMeeting: when_meeting_ends
withRecordings: close
accessUrl: 'http://localhost:6080/room/room-789'
status: closed
meetingEndAction: none
room_with_active_meeting_and_recordings_scheduled_to_be_deleted:
summary: Room with active meeting and recordings scheduled to be deleted
value:
message: 'Bulk deletion request processed successfully'
successful:
- successCode: room_with_active_meeting_and_recordings_scheduled_to_be_deleted
message: 'Room has an active meeting and recordings. Scheduled to be deleted when the meeting ends'
room:
roomId: 'room-101'
roomName: 'conference-room'
owner: 'diana_prince'
creationDate: 1620000000000
autoDeletionDate: null
autoDeletionPolicy:
withMeeting: when_meeting_ends
withRecordings: force
accessUrl: 'http://localhost:6080/room/room-101'
status: active_meeting
meetingEndAction: delete
room_with_active_meeting_scheduled_to_be_closed:
summary: Room with active meeting scheduled to be closed
value:
message: 'Bulk deletion request processed successfully'
successful:
- successCode: room_with_active_meeting_scheduled_to_be_closed
message: 'Room has an active meeting. Scheduled to be closed when the meeting ends'
room:
roomId: 'room-202'
roomName: 'training-room'
owner: 'eve_martin'
creationDate: 1620000000000
autoDeletionDate: null
autoDeletionPolicy:
withMeeting: when_meeting_ends
withRecordings: close
accessUrl: 'http://localhost:6080/room/room-202'
status: active_meeting
meetingEndAction: close
room_deleted:
summary: Room deleted successfully
value:
message: 'Bulk deletion request processed successfully'
successful:
- successCode: room_deleted
message: 'Room deleted successfully'
room_with_active_meeting_deleted:
summary: Room with active meeting deleted
value:
message: 'Bulk deletion request processed successfully'
successful:
- successCode: room_with_active_meeting_deleted
message: 'Room with active meeting deleted successfully'
room_and_recordings_deleted:
summary: Room and recordings deleted
value:
message: 'Bulk deletion request processed successfully'
successful:
- successCode: room_and_recordings_deleted
message: 'Room and recordings deleted successfully'
room_with_active_meeting_and_recordings_deleted:
summary: Room with active meeting and recordings deleted
value:
message: 'Bulk deletion request processed successfully'
successful:
- successCode: room_with_active_meeting_and_recordings_deleted
message: 'Room with active meeting and recordings deleted successfully'

View File

@ -2,33 +2,42 @@ description: Room was successfully processed for deletion
content:
application/json:
schema:
type: object
properties:
successCode:
type: string
enum:
- room_deleted
- room_with_active_meeting_deleted
- room_and_recordings_deleted
- room_closed
- room_with_active_meeting_and_recordings_deleted
- room_with_active_meeting_closed
description: A code representing the success scenario
message:
type: string
description: A message providing additional context about the success
room:
allOf:
- $ref: '../schemas/meet-room.yaml'
- type: object
properties:
_extraFields:
type: array
description: >
List of extra fields that can be included in the response based on the `X-ExtraFields` header or `extraFields` query parameter.
items:
type: string
example: config
oneOf:
- type: object
required: [successCode, message, room]
properties:
successCode:
type: string
enum:
- room_closed
- room_with_active_meeting_closed
message:
type: string
room:
allOf:
- $ref: '../schemas/meet-room.yaml'
- type: object
properties:
_extraFields:
type: array
description: >
List of extra fields that can be included in the response based on the `X-ExtraFields` header or `extraFields` query parameter.
items:
type: string
example: config
- type: object
required: [successCode, message]
properties:
successCode:
type: string
enum:
- room_deleted
- room_with_active_meeting_deleted
- room_and_recordings_deleted
- room_with_active_meeting_and_recordings_deleted
message:
type: string
examples:
room_deleted:

View File

@ -15,17 +15,17 @@ content:
type: string
description: A message providing additional context about the success
room:
allOf:
- $ref: '../schemas/meet-room.yaml'
- type: object
properties:
_extraFields:
type: array
description: >
List of extra fields that can be included in the response based on the `X-ExtraFields` header or `extraFields` query parameter.
items:
type: string
example: config
allOf:
- $ref: '../schemas/meet-room.yaml'
- type: object
properties:
_extraFields:
type: array
description: >
List of extra fields that can be included in the response based on the `X-ExtraFields` header or `extraFields` query parameter.
items:
type: string
example: config
examples:
room_with_active_meeting_scheduled_to_be_deleted:
value: