aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2021-05-24 19:38:26 +0200
committerRigel Kent <sendmemail@rigelk.eu>2021-05-26 14:24:51 +0200
commite2adb8cb404ead0039592d2ff82a1424384af357 (patch)
tree399c66ff675fc74344175b2bbf928e8b93398fc1
parent8ee37c5f38b0f9b7e97239197d5590109c163250 (diff)
downloadPeerTube-e2adb8cb404ead0039592d2ff82a1424384af357.tar.gz
PeerTube-e2adb8cb404ead0039592d2ff82a1424384af357.tar.zst
PeerTube-e2adb8cb404ead0039592d2ff82a1424384af357.zip
add operationId to common operations
-rw-r--r--support/doc/api/openapi.yaml48
1 files changed, 34 insertions, 14 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 61fd6c95a..f11bf448f 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -22,7 +22,7 @@ info:
22 - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin) 22 - [Kotlin](https://framagit.org/framasoft/peertube/clients/kotlin)
23 23
24 See the [REST API quick start](https://docs.joinpeertube.org/api-rest-getting-started) for a few 24 See the [REST API quick start](https://docs.joinpeertube.org/api-rest-getting-started) for a few
25 examples of using with the PeerTube API. 25 examples of using the PeerTube API.
26 26
27 # Authentication 27 # Authentication
28 28
@@ -125,7 +125,7 @@ tags:
125 description: | 125 description: |
126 As a visitor, you can use this API to open an account (if registrations are open on 126 As a visitor, you can use this API to open an account (if registrations are open on
127 that PeerTube instance). As an admin, you should use the dedicated [User creation 127 that PeerTube instance). As an admin, you should use the dedicated [User creation
128 API](#operation/createUser) instead. 128 API](#operation/addUser) instead.
129 - name: Session 129 - name: Session
130 x-displayName: Login/Logout 130 x-displayName: Login/Logout
131 description: | 131 description: |
@@ -690,7 +690,7 @@ paths:
690 /users: 690 /users:
691 post: 691 post:
692 summary: Create a user 692 summary: Create a user
693 operationId: createUser 693 operationId: addUser
694 security: 694 security:
695 - OAuth2: 695 - OAuth2:
696 - admin 696 - admin
@@ -705,18 +705,18 @@ paths:
705 $ref: '#/components/schemas/AddUserResponse' 705 $ref: '#/components/schemas/AddUserResponse'
706 links: 706 links:
707 # GET /users/{id} 707 # GET /users/{id}
708 GetUserId: 708 GetUser:
709 operationId: getUserId 709 operationId: getUser
710 parameters: 710 parameters:
711 id: '$response.body#/user/id' 711 id: '$response.body#/user/id'
712 # PUT /users/{id} 712 # PUT /users/{id}
713 PutUserId: 713 PutUser:
714 operationId: putUserId 714 operationId: putUser
715 parameters: 715 parameters:
716 id: '$response.body#/user/id' 716 id: '$response.body#/user/id'
717 # DELETE /users/{id} 717 # DELETE /users/{id}
718 DelUserId: 718 DelUser:
719 operationId: delUserId 719 operationId: delUser
720 parameters: 720 parameters:
721 id: '$response.body#/user/id' 721 id: '$response.body#/user/id'
722 '403': 722 '403':
@@ -764,7 +764,7 @@ paths:
764 - admin 764 - admin
765 tags: 765 tags:
766 - Users 766 - Users
767 operationId: delUserId 767 operationId: delUser
768 responses: 768 responses:
769 '204': 769 '204':
770 description: successful operation 770 description: successful operation
@@ -774,7 +774,7 @@ paths:
774 - OAuth2: [] 774 - OAuth2: []
775 tags: 775 tags:
776 - Users 776 - Users
777 operationId: getUserId 777 operationId: getUser
778 parameters: 778 parameters:
779 - name: withStats 779 - name: withStats
780 in: query 780 in: query
@@ -799,7 +799,7 @@ paths:
799 - OAuth2: [] 799 - OAuth2: []
800 tags: 800 tags:
801 - Users 801 - Users
802 operationId: putUserId 802 operationId: putUser
803 responses: 803 responses:
804 '204': 804 '204':
805 description: successful operation 805 description: successful operation
@@ -1493,6 +1493,7 @@ paths:
1493 /videos: 1493 /videos:
1494 get: 1494 get:
1495 summary: List videos 1495 summary: List videos
1496 operationId: getVideos
1496 tags: 1497 tags:
1497 - Video 1498 - Video
1498 parameters: 1499 parameters:
@@ -2024,7 +2025,7 @@ paths:
2024 /videos/live: 2025 /videos/live:
2025 post: 2026 post:
2026 summary: Create a live 2027 summary: Create a live
2027 operationId: createLive 2028 operationId: addLive
2028 security: 2029 security:
2029 - OAuth2: [] 2030 - OAuth2: []
2030 tags: 2031 tags:
@@ -2874,7 +2875,7 @@ paths:
2874 post: 2875 post:
2875 summary: Create a video playlist 2876 summary: Create a video playlist
2876 description: If the video playlist is set as public, `videoChannelId` is mandatory. 2877 description: If the video playlist is set as public, `videoChannelId` is mandatory.
2877 operationId: createPlaylist 2878 operationId: addPlaylist
2878 security: 2879 security:
2879 - OAuth2: [] 2880 - OAuth2: []
2880 tags: 2881 tags:
@@ -2994,6 +2995,7 @@ paths:
2994 /video-playlists/{playlistId}/videos: 2995 /video-playlists/{playlistId}/videos:
2995 get: 2996 get:
2996 summary: 'List videos of a playlist' 2997 summary: 'List videos of a playlist'
2998 operationId: getVideoPlaylistVideos
2997 tags: 2999 tags:
2998 - Videos 3000 - Videos
2999 - Video Playlists 3001 - Video Playlists
@@ -3008,6 +3010,7 @@ paths:
3008 $ref: '#/components/schemas/VideoListResponse' 3010 $ref: '#/components/schemas/VideoListResponse'
3009 post: 3011 post:
3010 summary: Add a video in a playlist 3012 summary: Add a video in a playlist
3013 operationId: addVideoPlaylistVideo
3011 security: 3014 security:
3012 - OAuth2: [] 3015 - OAuth2: []
3013 tags: 3016 tags:
@@ -3054,6 +3057,7 @@ paths:
3054 /video-playlists/{playlistId}/videos/reorder: 3057 /video-playlists/{playlistId}/videos/reorder:
3055 post: 3058 post:
3056 summary: 'Reorder a playlist' 3059 summary: 'Reorder a playlist'
3060 operationId: reorderVideoPlaylist
3057 security: 3061 security:
3058 - OAuth2: [] 3062 - OAuth2: []
3059 tags: 3063 tags:
@@ -3088,6 +3092,7 @@ paths:
3088 /video-playlists/{playlistId}/videos/{playlistElementId}: 3092 /video-playlists/{playlistId}/videos/{playlistElementId}:
3089 put: 3093 put:
3090 summary: Update a playlist element 3094 summary: Update a playlist element
3095 operationId: putVideoPlaylistVideo
3091 security: 3096 security:
3092 - OAuth2: [] 3097 - OAuth2: []
3093 tags: 3098 tags:
@@ -3114,6 +3119,7 @@ paths:
3114 description: Stop the video at this specific timestamp 3119 description: Stop the video at this specific timestamp
3115 delete: 3120 delete:
3116 summary: Delete an element from a playlist 3121 summary: Delete an element from a playlist
3122 operationId: delVideoPlaylistVideo
3117 security: 3123 security:
3118 - OAuth2: [] 3124 - OAuth2: []
3119 tags: 3125 tags:
@@ -3368,6 +3374,7 @@ paths:
3368 tags: 3374 tags:
3369 - Search 3375 - Search
3370 summary: Search videos 3376 summary: Search videos
3377 operationId: searchVideos
3371 parameters: 3378 parameters:
3372 - name: search 3379 - name: search
3373 in: query 3380 in: query
@@ -3444,6 +3451,7 @@ paths:
3444 tags: 3451 tags:
3445 - Search 3452 - Search
3446 summary: Search channels 3453 summary: Search channels
3454 operationId: searchChannels
3447 parameters: 3455 parameters:
3448 - name: search 3456 - name: search
3449 in: query 3457 in: query
@@ -3632,6 +3640,7 @@ paths:
3632 tags: 3640 tags:
3633 - Video Mirroring 3641 - Video Mirroring
3634 summary: List videos being mirrored 3642 summary: List videos being mirrored
3643 operationId: getMirroredVideos
3635 security: 3644 security:
3636 - OAuth2: 3645 - OAuth2:
3637 - admin 3646 - admin
@@ -3661,6 +3670,7 @@ paths:
3661 tags: 3670 tags:
3662 - Video Mirroring 3671 - Video Mirroring
3663 summary: Mirror a video 3672 summary: Mirror a video
3673 operationId: putMirroredVideo
3664 security: 3674 security:
3665 - OAuth2: 3675 - OAuth2:
3666 - admin 3676 - admin
@@ -3689,6 +3699,7 @@ paths:
3689 tags: 3699 tags:
3690 - Video Mirroring 3700 - Video Mirroring
3691 summary: Delete a mirror done on a video 3701 summary: Delete a mirror done on a video
3702 operationId: delMirroredVideo
3692 security: 3703 security:
3693 - OAuth2: 3704 - OAuth2:
3694 - admin 3705 - admin
@@ -3710,6 +3721,7 @@ paths:
3710 tags: 3721 tags:
3711 - Feeds 3722 - Feeds
3712 summary: List comments on videos 3723 summary: List comments on videos
3724 operationId: getSyndicatedComments
3713 parameters: 3725 parameters:
3714 - name: format 3726 - name: format
3715 in: path 3727 in: path
@@ -3804,6 +3816,7 @@ paths:
3804 tags: 3816 tags:
3805 - Feeds 3817 - Feeds
3806 summary: List videos 3818 summary: List videos
3819 operationId: getSyndicatedVideos
3807 parameters: 3820 parameters:
3808 - name: format 3821 - name: format
3809 in: path 3822 in: path
@@ -3892,6 +3905,7 @@ paths:
3892 - Feeds 3905 - Feeds
3893 - Account 3906 - Account
3894 summary: List videos of subscriptions tied to a token 3907 summary: List videos of subscriptions tied to a token
3908 operationId: getSyndicatedSubscriptionVideos
3895 parameters: 3909 parameters:
3896 - name: format 3910 - name: format
3897 in: path 3911 in: path
@@ -3954,6 +3968,7 @@ paths:
3954 tags: 3968 tags:
3955 - Plugins 3969 - Plugins
3956 summary: List plugins 3970 summary: List plugins
3971 operationId: getPlugins
3957 security: 3972 security:
3958 - OAuth2: 3973 - OAuth2:
3959 - admin 3974 - admin
@@ -3982,6 +3997,7 @@ paths:
3982 tags: 3997 tags:
3983 - Plugins 3998 - Plugins
3984 summary: List available plugins 3999 summary: List available plugins
4000 operationId: getAvailablePlugins
3985 security: 4001 security:
3986 - OAuth2: 4002 - OAuth2:
3987 - admin 4003 - admin
@@ -4016,6 +4032,7 @@ paths:
4016 tags: 4032 tags:
4017 - Plugins 4033 - Plugins
4018 summary: Install a plugin 4034 summary: Install a plugin
4035 operationId: addPlugin
4019 security: 4036 security:
4020 - OAuth2: 4037 - OAuth2:
4021 - admin 4038 - admin
@@ -4050,6 +4067,7 @@ paths:
4050 tags: 4067 tags:
4051 - Plugins 4068 - Plugins
4052 summary: Update a plugin 4069 summary: Update a plugin
4070 operationId: updatePlugin
4053 security: 4071 security:
4054 - OAuth2: 4072 - OAuth2:
4055 - admin 4073 - admin
@@ -4086,6 +4104,7 @@ paths:
4086 tags: 4104 tags:
4087 - Plugins 4105 - Plugins
4088 summary: Uninstall a plugin 4106 summary: Uninstall a plugin
4107 operationId: uninstallPlugin
4089 security: 4108 security:
4090 - OAuth2: 4109 - OAuth2:
4091 - admin 4110 - admin
@@ -4112,6 +4131,7 @@ paths:
4112 tags: 4131 tags:
4113 - Plugins 4132 - Plugins
4114 summary: Get a plugin 4133 summary: Get a plugin
4134 operationId: getPlugin
4115 security: 4135 security:
4116 - OAuth2: 4136 - OAuth2:
4117 - admin 4137 - admin