add operationId to common operations

This commit is contained in:
Rigel Kent 2021-05-24 19:38:26 +02:00
parent 8ee37c5f38
commit e2adb8cb40
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
1 changed files with 34 additions and 14 deletions

View File

@ -22,7 +22,7 @@ info:
- [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin) - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin)
See the [REST API quick start](https://docs.joinpeertube.org/api-rest-getting-started) for a few See the [REST API quick start](https://docs.joinpeertube.org/api-rest-getting-started) for a few
examples of using with the PeerTube API. examples of using the PeerTube API.
# Authentication # Authentication
@ -125,7 +125,7 @@ tags:
description: | description: |
As a visitor, you can use this API to open an account (if registrations are open on As a visitor, you can use this API to open an account (if registrations are open on
that PeerTube instance). As an admin, you should use the dedicated [User creation that PeerTube instance). As an admin, you should use the dedicated [User creation
API](#operation/createUser) instead. API](#operation/addUser) instead.
- name: Session - name: Session
x-displayName: Login/Logout x-displayName: Login/Logout
description: | description: |
@ -690,7 +690,7 @@ paths:
/users: /users:
post: post:
summary: Create a user summary: Create a user
operationId: createUser operationId: addUser
security: security:
- OAuth2: - OAuth2:
- admin - admin
@ -705,18 +705,18 @@ paths:
$ref: '#/components/schemas/AddUserResponse' $ref: '#/components/schemas/AddUserResponse'
links: links:
# GET /users/{id} # GET /users/{id}
GetUserId: GetUser:
operationId: getUserId operationId: getUser
parameters: parameters:
id: '$response.body#/user/id' id: '$response.body#/user/id'
# PUT /users/{id} # PUT /users/{id}
PutUserId: PutUser:
operationId: putUserId operationId: putUser
parameters: parameters:
id: '$response.body#/user/id' id: '$response.body#/user/id'
# DELETE /users/{id} # DELETE /users/{id}
DelUserId: DelUser:
operationId: delUserId operationId: delUser
parameters: parameters:
id: '$response.body#/user/id' id: '$response.body#/user/id'
'403': '403':
@ -764,7 +764,7 @@ paths:
- admin - admin
tags: tags:
- Users - Users
operationId: delUserId operationId: delUser
responses: responses:
'204': '204':
description: successful operation description: successful operation
@ -774,7 +774,7 @@ paths:
- OAuth2: [] - OAuth2: []
tags: tags:
- Users - Users
operationId: getUserId operationId: getUser
parameters: parameters:
- name: withStats - name: withStats
in: query in: query
@ -799,7 +799,7 @@ paths:
- OAuth2: [] - OAuth2: []
tags: tags:
- Users - Users
operationId: putUserId operationId: putUser
responses: responses:
'204': '204':
description: successful operation description: successful operation
@ -1493,6 +1493,7 @@ paths:
/videos: /videos:
get: get:
summary: List videos summary: List videos
operationId: getVideos
tags: tags:
- Video - Video
parameters: parameters:
@ -2024,7 +2025,7 @@ paths:
/videos/live: /videos/live:
post: post:
summary: Create a live summary: Create a live
operationId: createLive operationId: addLive
security: security:
- OAuth2: [] - OAuth2: []
tags: tags:
@ -2874,7 +2875,7 @@ paths:
post: post:
summary: Create a video playlist summary: Create a video playlist
description: If the video playlist is set as public, `videoChannelId` is mandatory. description: If the video playlist is set as public, `videoChannelId` is mandatory.
operationId: createPlaylist operationId: addPlaylist
security: security:
- OAuth2: [] - OAuth2: []
tags: tags:
@ -2994,6 +2995,7 @@ paths:
/video-playlists/{playlistId}/videos: /video-playlists/{playlistId}/videos:
get: get:
summary: 'List videos of a playlist' summary: 'List videos of a playlist'
operationId: getVideoPlaylistVideos
tags: tags:
- Videos - Videos
- Video Playlists - Video Playlists
@ -3008,6 +3010,7 @@ paths:
$ref: '#/components/schemas/VideoListResponse' $ref: '#/components/schemas/VideoListResponse'
post: post:
summary: Add a video in a playlist summary: Add a video in a playlist
operationId: addVideoPlaylistVideo
security: security:
- OAuth2: [] - OAuth2: []
tags: tags:
@ -3054,6 +3057,7 @@ paths:
/video-playlists/{playlistId}/videos/reorder: /video-playlists/{playlistId}/videos/reorder:
post: post:
summary: 'Reorder a playlist' summary: 'Reorder a playlist'
operationId: reorderVideoPlaylist
security: security:
- OAuth2: [] - OAuth2: []
tags: tags:
@ -3088,6 +3092,7 @@ paths:
/video-playlists/{playlistId}/videos/{playlistElementId}: /video-playlists/{playlistId}/videos/{playlistElementId}:
put: put:
summary: Update a playlist element summary: Update a playlist element
operationId: putVideoPlaylistVideo
security: security:
- OAuth2: [] - OAuth2: []
tags: tags:
@ -3114,6 +3119,7 @@ paths:
description: Stop the video at this specific timestamp description: Stop the video at this specific timestamp
delete: delete:
summary: Delete an element from a playlist summary: Delete an element from a playlist
operationId: delVideoPlaylistVideo
security: security:
- OAuth2: [] - OAuth2: []
tags: tags:
@ -3368,6 +3374,7 @@ paths:
tags: tags:
- Search - Search
summary: Search videos summary: Search videos
operationId: searchVideos
parameters: parameters:
- name: search - name: search
in: query in: query
@ -3444,6 +3451,7 @@ paths:
tags: tags:
- Search - Search
summary: Search channels summary: Search channels
operationId: searchChannels
parameters: parameters:
- name: search - name: search
in: query in: query
@ -3632,6 +3640,7 @@ paths:
tags: tags:
- Video Mirroring - Video Mirroring
summary: List videos being mirrored summary: List videos being mirrored
operationId: getMirroredVideos
security: security:
- OAuth2: - OAuth2:
- admin - admin
@ -3661,6 +3670,7 @@ paths:
tags: tags:
- Video Mirroring - Video Mirroring
summary: Mirror a video summary: Mirror a video
operationId: putMirroredVideo
security: security:
- OAuth2: - OAuth2:
- admin - admin
@ -3689,6 +3699,7 @@ paths:
tags: tags:
- Video Mirroring - Video Mirroring
summary: Delete a mirror done on a video summary: Delete a mirror done on a video
operationId: delMirroredVideo
security: security:
- OAuth2: - OAuth2:
- admin - admin
@ -3710,6 +3721,7 @@ paths:
tags: tags:
- Feeds - Feeds
summary: List comments on videos summary: List comments on videos
operationId: getSyndicatedComments
parameters: parameters:
- name: format - name: format
in: path in: path
@ -3804,6 +3816,7 @@ paths:
tags: tags:
- Feeds - Feeds
summary: List videos summary: List videos
operationId: getSyndicatedVideos
parameters: parameters:
- name: format - name: format
in: path in: path
@ -3892,6 +3905,7 @@ paths:
- Feeds - Feeds
- Account - Account
summary: List videos of subscriptions tied to a token summary: List videos of subscriptions tied to a token
operationId: getSyndicatedSubscriptionVideos
parameters: parameters:
- name: format - name: format
in: path in: path
@ -3954,6 +3968,7 @@ paths:
tags: tags:
- Plugins - Plugins
summary: List plugins summary: List plugins
operationId: getPlugins
security: security:
- OAuth2: - OAuth2:
- admin - admin
@ -3982,6 +3997,7 @@ paths:
tags: tags:
- Plugins - Plugins
summary: List available plugins summary: List available plugins
operationId: getAvailablePlugins
security: security:
- OAuth2: - OAuth2:
- admin - admin
@ -4016,6 +4032,7 @@ paths:
tags: tags:
- Plugins - Plugins
summary: Install a plugin summary: Install a plugin
operationId: addPlugin
security: security:
- OAuth2: - OAuth2:
- admin - admin
@ -4050,6 +4067,7 @@ paths:
tags: tags:
- Plugins - Plugins
summary: Update a plugin summary: Update a plugin
operationId: updatePlugin
security: security:
- OAuth2: - OAuth2:
- admin - admin
@ -4086,6 +4104,7 @@ paths:
tags: tags:
- Plugins - Plugins
summary: Uninstall a plugin summary: Uninstall a plugin
operationId: uninstallPlugin
security: security:
- OAuth2: - OAuth2:
- admin - admin
@ -4112,6 +4131,7 @@ paths:
tags: tags:
- Plugins - Plugins
summary: Get a plugin summary: Get a plugin
operationId: getPlugin
security: security:
- OAuth2: - OAuth2:
- admin - admin