diff --git a/backend/openapi/components/headers/accept-ranges.yaml b/backend/openapi/components/headers/accept-ranges.yaml new file mode 100644 index 0000000..8b9b012 --- /dev/null +++ b/backend/openapi/components/headers/accept-ranges.yaml @@ -0,0 +1,4 @@ +description: Indicates that the server supports range requests for content retrieval +schema: + type: string +example: bytes diff --git a/backend/openapi/components/headers/cache-control.yaml b/backend/openapi/components/headers/cache-control.yaml new file mode 100644 index 0000000..f6fc13d --- /dev/null +++ b/backend/openapi/components/headers/cache-control.yaml @@ -0,0 +1,4 @@ +description: Directives for caching mechanisms in requests/responses +schema: + type: string +example: public, max-age=3600 diff --git a/backend/openapi/components/headers/content-length.yaml b/backend/openapi/components/headers/content-length.yaml new file mode 100644 index 0000000..bfacf48 --- /dev/null +++ b/backend/openapi/components/headers/content-length.yaml @@ -0,0 +1,3 @@ +description: The size of the content in bytes +schema: + type: integer diff --git a/backend/openapi/components/headers/content-range.yaml b/backend/openapi/components/headers/content-range.yaml new file mode 100644 index 0000000..02f35ad --- /dev/null +++ b/backend/openapi/components/headers/content-range.yaml @@ -0,0 +1,4 @@ +description: Specifies the range of bytes being sent and the total size of the resource +schema: + type: string +example: bytes 0-1023/10240 diff --git a/backend/openapi/components/parameters/recording-range.yaml b/backend/openapi/components/parameters/recording-range.yaml index 13b12b8..fd40c4c 100644 --- a/backend/openapi/components/parameters/recording-range.yaml +++ b/backend/openapi/components/parameters/recording-range.yaml @@ -2,7 +2,10 @@ name: Range in: header required: false description: > - Byte range for partial content retrieval. - Example: `bytes=0-1023` to request the first 1024 bytes of the file. + This endpoint accepts a `Range` header to specify the byte range of the recording file to be streamed. + The format of the `Range` header should be `bytes=start-end`, where `start` is required and `end` is optional. + For example, + - `bytes=0-1023` to request the first 1024 bytes of the file. + - `bytes=1000-` to request from byte 1000 to the end of the file. schema: type: string diff --git a/backend/openapi/paths/recordings.yaml b/backend/openapi/paths/recordings.yaml index b449125..87bb6ab 100644 --- a/backend/openapi/paths/recordings.yaml +++ b/backend/openapi/paths/recordings.yaml @@ -135,7 +135,7 @@ $ref: '../components/responses/internal-server-error.yaml' /recordings/{recordingId}/media: get: - operationId: getRecordingMeedia + operationId: getRecordingMedia summary: Get recording media description: > Retrieves the media of a recording with the specified recording ID. @@ -145,6 +145,7 @@ tags: - OpenVidu Meet - Recordings security: + - apiKeyInHeader: [] - accessTokenCookie: [] parameters: - $ref: '../components/parameters/recording-id.yaml' @@ -154,13 +155,11 @@ description: Successfully streaming the full recording headers: Accept-Ranges: - description: Indicates that byte-range requests are supported - schema: - type: string + $ref: '../components/headers/accept-ranges.yaml' Content-Length: - description: The total file size in bytes - schema: - type: integer + $ref: '../components/headers/content-length.yaml' + Cache-Control: + $ref: '../components/headers/cache-control.yaml' content: video/mp4: schema: @@ -170,17 +169,13 @@ description: Partial content streaming based on byte range headers: Accept-Ranges: - description: Indicates that byte-range requests are supported - schema: - type: string - Content-Range: - description: Specifies the range of bytes being sent - schema: - type: string + $ref: '../components/headers/accept-ranges.yaml' Content-Length: - description: The length of the partial content in bytes - schema: - type: integer + $ref: '../components/headers/content-length.yaml' + Cache-Control: + $ref: '../components/headers/cache-control.yaml' + Content-Range: + $ref: '../components/headers/content-range.yaml' content: video/mp4: schema: