fix video playlistId/videoId for video playlists in openapi spec

closes #4081
This commit is contained in:
Rigel Kent 2021-05-12 14:33:04 +02:00
parent 16c016e8b1
commit c00100b607
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
1 changed files with 42 additions and 21 deletions

View File

@ -1976,10 +1976,12 @@ paths:
- $ref: '#/components/schemas/Video/properties/id' - $ref: '#/components/schemas/Video/properties/id'
startAt: startAt:
type: integer type: integer
format: seconds
description: Timestamp in the video that marks the beginning of the report description: Timestamp in the video that marks the beginning of the report
minimum: 0 minimum: 0
endAt: endAt:
type: integer type: integer
format: seconds
description: Timestamp in the video that marks the ending of the report description: Timestamp in the video that marks the ending of the report
minimum: 0 minimum: 0
comment: comment:
@ -2564,13 +2566,13 @@ paths:
thumbnailfile: thumbnailfile:
contentType: image/jpeg contentType: image/jpeg
/video-playlists/{id}: /video-playlists/{playlistId}:
get: get:
summary: Get a video playlist summary: Get a video playlist
tags: tags:
- Video Playlists - Video Playlists
parameters: parameters:
- $ref: '#/components/parameters/idOrUUID' - $ref: '#/components/parameters/playlistId'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -2589,7 +2591,7 @@ paths:
'204': '204':
description: successful operation description: successful operation
parameters: parameters:
- $ref: '#/components/parameters/idOrUUID' - $ref: '#/components/parameters/playlistId'
requestBody: requestBody:
content: content:
multipart/form-data: multipart/form-data:
@ -2624,19 +2626,19 @@ paths:
tags: tags:
- Video Playlists - Video Playlists
parameters: parameters:
- $ref: '#/components/parameters/idOrUUID' - $ref: '#/components/parameters/playlistId'
responses: responses:
'204': '204':
description: successful operation description: successful operation
/video-playlists/{id}/videos: /video-playlists/{playlistId}/videos:
get: get:
summary: 'List videos of a playlist' summary: 'List videos of a playlist'
tags: tags:
- Videos - Videos
- Video Playlists - Video Playlists
parameters: parameters:
- $ref: '#/components/parameters/idOrUUID' - $ref: '#/components/parameters/playlistId'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -2645,14 +2647,14 @@ paths:
schema: schema:
$ref: '#/components/schemas/VideoListResponse' $ref: '#/components/schemas/VideoListResponse'
post: post:
summary: 'Add a video in a playlist' summary: Add a video in a playlist
security: security:
- OAuth2: [] - OAuth2: []
tags: tags:
- Videos - Videos
- Video Playlists - Video Playlists
parameters: parameters:
- $ref: '#/components/parameters/idOrUUID' - $ref: '#/components/parameters/playlistId'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -2666,6 +2668,7 @@ paths:
properties: properties:
id: id:
type: integer type: integer
example: 2
requestBody: requestBody:
content: content:
application/json: application/json:
@ -2673,19 +2676,22 @@ paths:
type: object type: object
properties: properties:
videoId: videoId:
allOf: oneOf:
- $ref: '#/components/schemas/Video/properties/uuid'
- $ref: '#/components/schemas/Video/properties/id' - $ref: '#/components/schemas/Video/properties/id'
description: Video to add in the playlist description: Video to add in the playlist
startTimestamp: startTimestamp:
type: integer type: integer
description: Start the video at this specific timestamp (in seconds) format: seconds
description: Start the video at this specific timestamp
stopTimestamp: stopTimestamp:
type: integer type: integer
description: Stop the video at this specific timestamp (in seconds) format: seconds
description: Stop the video at this specific timestamp
required: required:
- videoId - videoId
/video-playlists/{id}/videos/reorder: /video-playlists/{playlistId}/videos/reorder:
post: post:
summary: 'Reorder a playlist' summary: 'Reorder a playlist'
security: security:
@ -2693,7 +2699,7 @@ paths:
tags: tags:
- Video Playlists - Video Playlists
parameters: parameters:
- $ref: '#/components/parameters/idOrUUID' - $ref: '#/components/parameters/playlistId'
responses: responses:
'204': '204':
description: successful operation description: successful operation
@ -2719,15 +2725,15 @@ paths:
- startPosition - startPosition
- insertAfterPosition - insertAfterPosition
/video-playlists/{id}/videos/{playlistElementId}: /video-playlists/{playlistId}/videos/{playlistElementId}:
put: put:
summary: 'Update a playlist element' summary: Update a playlist element
security: security:
- OAuth2: [] - OAuth2: []
tags: tags:
- Video Playlists - Video Playlists
parameters: parameters:
- $ref: '#/components/parameters/idOrUUID' - $ref: '#/components/parameters/playlistId'
- $ref: '#/components/parameters/playlistElementId' - $ref: '#/components/parameters/playlistElementId'
responses: responses:
'204': '204':
@ -2740,18 +2746,20 @@ paths:
properties: properties:
startTimestamp: startTimestamp:
type: integer type: integer
description: 'Start the video at this specific timestamp (in seconds)' format: seconds
description: Start the video at this specific timestamp
stopTimestamp: stopTimestamp:
type: integer type: integer
description: 'Stop the video at this specific timestamp (in seconds)' format: seconds
description: Stop the video at this specific timestamp
delete: delete:
summary: 'Delete an element from a playlist' summary: Delete an element from a playlist
security: security:
- OAuth2: [] - OAuth2: []
tags: tags:
- Video Playlists - Video Playlists
parameters: parameters:
- $ref: '#/components/parameters/idOrUUID' - $ref: '#/components/parameters/playlistId'
- $ref: '#/components/parameters/playlistElementId' - $ref: '#/components/parameters/playlistElementId'
responses: responses:
'204': '204':
@ -2759,7 +2767,7 @@ paths:
'/users/me/video-playlists/videos-exist': '/users/me/video-playlists/videos-exist':
get: get:
summary: 'Check video exists in my playlists' summary: Check video exists in my playlists
security: security:
- OAuth2: [] - OAuth2: []
tags: tags:
@ -2792,8 +2800,10 @@ paths:
type: integer type: integer
startTimestamp: startTimestamp:
type: integer type: integer
format: seconds
stopTimestamp: stopTimestamp:
type: integer type: integer
format: seconds
'/accounts/{name}/video-channels': '/accounts/{name}/video-channels':
get: get:
@ -3984,6 +3994,13 @@ components:
oneOf: oneOf:
- $ref: '#/components/schemas/id' - $ref: '#/components/schemas/id'
- $ref: '#/components/schemas/UUIDv4' - $ref: '#/components/schemas/UUIDv4'
playlistId:
name: playlistId
in: path
required: true
description: Playlist id
schema:
$ref: '#/components/schemas/VideoPlaylist/properties/id'
playlistElementId: playlistElementId:
name: playlistElementId name: playlistElementId
in: path in: path
@ -4447,8 +4464,10 @@ components:
type: integer type: integer
startTimestamp: startTimestamp:
type: integer type: integer
format: seconds
stopTimestamp: stopTimestamp:
type: integer type: integer
format: seconds
video: video:
nullable: true nullable: true
allOf: allOf:
@ -4597,6 +4616,7 @@ components:
duration: duration:
type: integer type: integer
example: 1419 example: 1419
format: seconds
description: duration of the video in seconds description: duration of the video in seconds
isLocal: isLocal:
type: boolean type: boolean
@ -5091,6 +5111,7 @@ components:
properties: properties:
currentTime: currentTime:
type: integer type: integer
format: seconds
description: timestamp within the video, in seconds description: timestamp within the video, in seconds
example: 5 example: 5
ServerConfig: ServerConfig: