From 3f71c4c0688eee7332cb166adb9f7cf6bdc546cd Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Fri, 14 May 2021 19:31:24 +0200 Subject: fix typo in operationId in openapi spec --- support/doc/api/openapi.yaml | 118 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 111 insertions(+), 7 deletions(-) (limited to 'support/doc') diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml index db89153d7..61fd6c95a 100644 --- a/support/doc/api/openapi.yaml +++ b/support/doc/api/openapi.yaml @@ -65,7 +65,7 @@ info: { "errors": { - "id": { // + "id": { "value": "a117eb-c6a9-4756-bb09-2a956239f", "msg": "Should have a valid id", "param": "id", @@ -302,6 +302,7 @@ paths: tags: - Accounts summary: Get an account + operationId: getAccount parameters: - $ref: '#/components/parameters/name' responses: @@ -313,12 +314,14 @@ paths: $ref: '#/components/schemas/Account' '404': description: account not found + '/accounts/{name}/videos': get: tags: - Accounts - Video summary: 'List videos of an account' + operationId: getAccountVideos parameters: - $ref: '#/components/parameters/name' - $ref: '#/components/parameters/categoryOneOf' @@ -374,11 +377,13 @@ paths: json = r.json() print(json) + /accounts: get: tags: - Accounts summary: List accounts + operationId: getAccounts parameters: - $ref: '#/components/parameters/start' - $ref: '#/components/parameters/count' @@ -392,11 +397,13 @@ paths: type: array items: $ref: '#/components/schemas/Account' + /config: get: tags: - Config summary: Get instance public configuration + operationId: getConfig responses: '200': description: successful operation @@ -407,9 +414,11 @@ paths: examples: nightly: externalValue: https://peertube2.cpy.re/api/v1/config + /config/about: get: summary: Get instance "About" information + operationId: getAbout tags: - Config responses: @@ -422,9 +431,11 @@ paths: examples: nightly: externalValue: https://peertube2.cpy.re/api/v1/config/about + /config/custom: get: summary: Get instance runtime configuration + operationId: getCustomConfig tags: - Config security: @@ -439,6 +450,7 @@ paths: $ref: '#/components/schemas/ServerConfigCustom' put: summary: Set instance runtime configuration + operationId: putCustomConfig tags: - Config security: @@ -455,6 +467,7 @@ paths: - webtorrent and hls are disabled with transcoding enabled - you need at least one enabled delete: summary: Delete instance runtime configuration + operationId: delCustomConfig tags: - Config security: @@ -463,9 +476,11 @@ paths: responses: '200': description: successful operation + /jobs/{state}: get: summary: List instance jobs + operationId: getJobs security: - OAuth2: - admin @@ -532,6 +547,7 @@ paths: type: array items: $ref: '#/components/schemas/Follow' + '/server/followers/{nameWithHost}': delete: summary: Remove or reject a follower to your server @@ -553,6 +569,7 @@ paths: description: successful operation '404': description: follower not found + '/server/followers/{nameWithHost}/reject': post: summary: Reject a pending follower to your server @@ -574,6 +591,7 @@ paths: description: successful operation '404': description: follower not found + '/server/followers/{nameWithHost}/accept': post: summary: Accept a pending follower to your server @@ -646,6 +664,7 @@ paths: type: string format: hostname uniqueItems: true + '/server/following/{host}': delete: summary: Unfollow a server @@ -713,6 +732,7 @@ paths: required: true get: summary: List users + operationId: getUsers security: - OAuth2: - admin @@ -733,6 +753,7 @@ paths: type: array items: $ref: '#/components/schemas/User' + '/users/{id}': parameters: - $ref: '#/components/parameters/id' @@ -792,7 +813,7 @@ paths: /oauth-clients/local: get: summary: Login prerequisite - description: You need to retrieve a client id and secret before [logging in](#operation/getOauthToken). + description: You need to retrieve a client id and secret before [logging in](#operation/getOAuthToken). operationId: getOAuthClient tags: - Session @@ -816,6 +837,7 @@ paths: ## AUTH curl -s "$API/oauth-clients/local" + /users/token: post: summary: Login @@ -880,6 +902,7 @@ paths: --data username="$USERNAME" \ --data password="$PASSWORD" \ | jq -r ".access_token" + /users/revoke-token: post: summary: Logout @@ -896,6 +919,7 @@ paths: /users/register: post: summary: Register a user + operationId: registerUser tags: - Users - Register @@ -908,9 +932,11 @@ paths: schema: $ref: '#/components/schemas/RegisterUser' required: true + /users/{id}/verify-email: post: summary: Verify a user + operationId: verifyUser description: | Following a user registration, the new user will receive an email asking to click a link containing a secret. @@ -939,9 +965,11 @@ paths: description: invalid verification string '404': description: user not found + /users/ask-send-verify-email: post: summary: Resend user verification link + operationId: resendEmailToVerifyUser tags: - Users - Register @@ -952,6 +980,7 @@ paths: /users/me: get: summary: Get my user information + operationId: getUserInfo security: - OAuth2: - user @@ -968,6 +997,7 @@ paths: $ref: '#/components/schemas/User' put: summary: Update my user information + operationId: putUserInfo security: - OAuth2: - user @@ -982,6 +1012,7 @@ paths: schema: $ref: '#/components/schemas/UpdateMe' required: true + /users/me/videos/imports: get: summary: Get video imports of my user @@ -1002,6 +1033,7 @@ paths: application/json: schema: $ref: '#/components/schemas/VideoImportsList' + /users/me/video-quota-used: get: summary: Get my user used quota @@ -1026,6 +1058,7 @@ paths: type: number description: The user video quota used today in bytes example: 1681014151 + '/users/me/videos/{videoId}/rating': get: summary: Get rate of my user for a video @@ -1048,6 +1081,7 @@ paths: application/json: schema: $ref: '#/components/schemas/GetMeVideoRating' + /users/me/videos: get: summary: Get videos of my user @@ -1068,6 +1102,7 @@ paths: application/json: schema: $ref: '#/components/schemas/VideoListResponse' + /users/me/subscriptions: get: summary: Get my user subscriptions @@ -1113,6 +1148,7 @@ paths: responses: '200': description: successful operation + /users/me/subscriptions/exist: get: summary: Get if subscriptions exist for my user @@ -1130,6 +1166,7 @@ paths: application/json: schema: type: object + /users/me/subscriptions/videos: get: summary: List videos of subscriptions of my user @@ -1159,6 +1196,7 @@ paths: application/json: schema: $ref: '#/components/schemas/VideoListResponse' + '/users/me/subscriptions/{subscriptionHandle}': get: summary: Get subscription of my user @@ -1188,6 +1226,7 @@ paths: responses: '200': description: successful operation + /users/me/notifications: get: summary: List my notifications @@ -1211,6 +1250,7 @@ paths: application/json: schema: $ref: '#/components/schemas/NotificationListResponse' + /users/me/notifications/read: post: summary: Mark notifications as read by their id @@ -1234,6 +1274,7 @@ paths: responses: '204': description: successful operation + /users/me/notifications/read-all: post: summary: Mark all my notification as read @@ -1244,6 +1285,7 @@ paths: responses: '204': description: successful operation + /users/me/notification-settings: put: summary: Update my notification settings @@ -1284,6 +1326,7 @@ paths: responses: '204': description: successful operation + /users/me/history/videos: get: summary: List watched videos history @@ -1302,6 +1345,7 @@ paths: application/json: schema: $ref: '#/components/schemas/VideoListResponse' + /users/me/history/videos/remove: post: summary: Clear video history @@ -1322,6 +1366,7 @@ paths: responses: '204': description: successful operation + /users/me/avatar/pick: post: summary: Update my user avatar @@ -1360,6 +1405,7 @@ paths: encoding: avatarfile: contentType: image/png, image/jpeg + /users/me/avatar: delete: summary: Delete my avatar @@ -1381,6 +1427,7 @@ paths: responses: '200': description: successful operation + '/videos/ownership/{id}/accept': post: summary: Accept ownership change request @@ -1397,6 +1444,7 @@ paths: description: cannot terminate an ownership change of another user '404': description: video owneship change not found + '/videos/ownership/{id}/refuse': post: summary: Refuse ownership change request @@ -1413,6 +1461,7 @@ paths: description: cannot terminate an ownership change of another user '404': description: video owneship change not found + '/videos/{id}/give-ownership': post: summary: Request ownership change @@ -1440,6 +1489,7 @@ paths: description: changing video ownership to a remote account is not supported yet '404': description: video not found + /videos: get: summary: List videos @@ -1465,6 +1515,7 @@ paths: application/json: schema: $ref: '#/components/schemas/VideoListResponse' + /videos/categories: get: summary: List available video categories @@ -1483,6 +1534,7 @@ paths: examples: nightly: externalValue: https://peertube2.cpy.re/api/v1/videos/categories + /videos/licences: get: summary: List available video licences @@ -1501,6 +1553,7 @@ paths: examples: nightly: externalValue: https://peertube2.cpy.re/api/v1/videos/licences + /videos/languages: get: summary: List available video languages @@ -1519,6 +1572,7 @@ paths: examples: nightly: externalValue: https://peertube2.cpy.re/api/v1/videos/languages + /videos/privacies: get: summary: List available video privacy policies @@ -1537,9 +1591,11 @@ paths: examples: nightly: externalValue: https://peertube2.cpy.re/api/v1/videos/privacies + '/videos/{id}': put: summary: Update a video + operationId: putVideo security: - OAuth2: [] tags: @@ -1614,6 +1670,7 @@ paths: contentType: image/jpeg get: summary: Get a video + operationId: getVideo tags: - Video parameters: @@ -1627,6 +1684,7 @@ paths: $ref: '#/components/schemas/VideoDetails' delete: summary: Delete a video + operationId: delVideo security: - OAuth2: [] tags: @@ -1636,9 +1694,11 @@ paths: responses: '204': description: successful operation + '/videos/{id}/description': get: summary: Get complete video description + operationId: getVideoDesc tags: - Video parameters: @@ -1655,6 +1715,7 @@ paths: maxLength: 10000 example: | **[Want to help to translate this video?](https://weblate.framasoft.org/projects/what-is-peertube-video/)**\r\n\r\n**Take back the control of your videos! [#JoinPeertube](https://joinpeertube.org)** + '/videos/{id}/views': post: summary: Add a view to a video @@ -1665,6 +1726,7 @@ paths: responses: '204': description: successful operation + '/videos/{id}/watching': put: summary: Set watching progress of a video @@ -1683,6 +1745,7 @@ paths: responses: '204': description: successful operation + /videos/upload: post: summary: Upload a video @@ -1759,6 +1822,7 @@ paths: --form videofile=@"$FILE_PATH" \ --form channelId=$CHANNEL_ID \ --form name="$NAME" + /videos/upload-resumable: post: summary: Initialize the resumable upload of a video @@ -1920,6 +1984,7 @@ paths: schema: type: number example: 0 + /videos/imports: post: summary: Import a video @@ -2207,7 +2272,6 @@ paths: type: array items: $ref: '#/components/schemas/Abuse' - post: summary: Report an abuse security: @@ -2275,6 +2339,7 @@ paths: $ref: '#/components/schemas/id' '400': description: incorrect request parameters + '/abuses/{abuseId}': put: summary: Update an abuse @@ -2319,6 +2384,7 @@ paths: description: successful operation '404': description: block not found + '/abuses/{abuseId}/messages': get: summary: List messages of an abuse @@ -2343,7 +2409,6 @@ paths: type: array items: $ref: '#/components/schemas/AbuseMessage' - post: summary: Add message to an abuse security: @@ -2371,6 +2436,7 @@ paths: description: successful operation '400': description: incorrect request parameters + '/abuses/{abuseId}/messages/{abuseMessageId}': delete: summary: Delete an abuse message @@ -2388,6 +2454,7 @@ paths: '/videos/{id}/blacklist': post: summary: Block a video + operationId: addVideoBlock security: - OAuth2: - admin @@ -2401,6 +2468,7 @@ paths: description: successful operation delete: summary: Unblock a video by its id + operationId: delVideoBlock security: - OAuth2: - admin @@ -2414,11 +2482,13 @@ paths: description: successful operation '404': description: block not found + /videos/blacklist: get: tags: - Video Blocks summary: List video blocks + operationId: getVideoBlocks security: - OAuth2: - admin @@ -2460,9 +2530,11 @@ paths: type: array items: $ref: '#/components/schemas/VideoBlacklist' + /videos/{id}/captions: get: summary: List captions of a video + operationId: getVideoCaptions tags: - Video Captions parameters: @@ -2482,9 +2554,11 @@ paths: type: array items: $ref: '#/components/schemas/VideoCaption' + /videos/{id}/captions/{captionLanguage}: put: summary: Add or replace a video caption + operationId: addVideoCaption security: - OAuth2: - user @@ -2513,6 +2587,7 @@ paths: description: video or language not found delete: summary: Delete a video caption + operationId: delVideoCaption security: - OAuth2: - user @@ -2526,6 +2601,7 @@ paths: description: successful operation '404': description: video or language or caption for that language not found + /video-channels: get: summary: List video channels @@ -2545,7 +2621,7 @@ paths: $ref: '#/components/schemas/VideoChannelList' post: summary: Create a video channel - operationId: createVideoChannel + operationId: addVideoChannel security: - OAuth2: [] tags: @@ -2568,6 +2644,7 @@ paths: application/json: schema: $ref: '#/components/schemas/VideoChannelCreate' + '/video-channels/{channelHandle}': get: summary: Get a video channel @@ -2585,6 +2662,7 @@ paths: $ref: '#/components/schemas/VideoChannel' put: summary: Update a video channel + operationId: putVideoChannel security: - OAuth2: [] tags: @@ -2601,6 +2679,7 @@ paths: $ref: '#/components/schemas/VideoChannelUpdate' delete: summary: Delete a video channel + operationId: delVideoChannel security: - OAuth2: [] tags: @@ -2610,9 +2689,11 @@ paths: responses: '204': description: successful operation + '/video-channels/{channelHandle}/videos': get: summary: List videos of a video channel + operationId: getVideoChannelVideos tags: - Video - Video Channels @@ -2637,6 +2718,7 @@ paths: application/json: schema: $ref: '#/components/schemas/VideoListResponse' + '/video-channels/{channelHandle}/avatar/pick': post: summary: Update channel avatar @@ -2677,6 +2759,7 @@ paths: encoding: avatarfile: contentType: image/png, image/jpeg + '/video-channels/{channelHandle}/avatar': delete: summary: Delete channel avatar @@ -2690,7 +2773,6 @@ paths: '204': description: successful operation - '/video-channels/{channelHandle}/banner/pick': post: summary: Update channel banner @@ -2731,6 +2813,7 @@ paths: encoding: bannerfile: contentType: image/png, image/jpeg + '/video-channels/{channelHandle}/banner': delete: summary: Delete channel banner @@ -3105,6 +3188,7 @@ paths: application/json: schema: $ref: '#/components/schemas/VideoChannelList' + '/accounts/{name}/ratings': get: summary: List ratings of an account @@ -3135,6 +3219,7 @@ paths: type: array items: $ref: '#/components/schemas/VideoRating' + '/videos/{id}/comment-threads': get: summary: List threads of a video @@ -3198,6 +3283,7 @@ paths: application/json: schema: $ref: '#/components/schemas/VideoCommentThreadTree' + '/videos/{id}/comments/{commentId}': post: summary: Reply to a thread of a video @@ -3230,7 +3316,6 @@ paths: maxLength: 10000 required: - text - delete: summary: Delete a comment or a reply security: @@ -3249,6 +3334,7 @@ paths: description: comment or video does not exist '409': description: comment is already deleted + '/videos/{id}/rate': put: summary: Like/dislike a video @@ -3276,6 +3362,7 @@ paths: description: successful operation '404': description: video does not exist + /search/videos: get: tags: @@ -3351,6 +3438,7 @@ paths: $ref: '#/components/schemas/VideoListResponse' '500': description: search index unavailable + /search/video-channels: get: tags: @@ -3422,6 +3510,7 @@ paths: description: successful operation '409': description: self-blocking forbidden + '/server/blocklist/accounts/{accountName}': delete: tags: @@ -3482,6 +3571,7 @@ paths: description: successful operation '409': description: self-blocking forbidden + '/server/blocklist/servers/{host}': delete: tags: @@ -3536,6 +3626,7 @@ paths: description: successful operation '404': description: server is not already known + /server/redundancy/videos: get: tags: @@ -3592,6 +3683,7 @@ paths: description: video does not exist '409': description: video is already mirrored + /server/redundancy/videos/{redundancyId}: delete: tags: @@ -3706,6 +3798,7 @@ paths: description: video, video channel or account not found '406': description: accept header unsupported + '/feeds/videos.{format}': get: tags: @@ -3792,6 +3885,7 @@ paths: description: video channel or account not found '406': description: accept header unsupported + '/feeds/subscriptions.{format}': get: tags: @@ -3854,6 +3948,7 @@ paths: type: object '406': description: accept header unsupported + /plugins: get: tags: @@ -3881,6 +3976,7 @@ paths: application/json: schema: $ref: '#/components/schemas/PluginResponse' + /plugins/available: get: tags: @@ -3914,6 +4010,7 @@ paths: $ref: '#/components/schemas/PluginResponse' '503': description: plugin index unavailable + /plugins/install: post: tags: @@ -3947,6 +4044,7 @@ paths: description: successful operation '400': description: should have either `npmName` or `path` set + /plugins/update: post: tags: @@ -3982,6 +4080,7 @@ paths: description: should have either `npmName` or `path` set '404': description: existing plugin not found + /plugins/uninstall: post: tags: @@ -4007,6 +4106,7 @@ paths: description: successful operation '404': description: existing plugin not found + /plugins/{npmName}: get: tags: @@ -4026,6 +4126,7 @@ paths: $ref: '#/components/schemas/Plugin' '404': description: plugin not found + /plugins/{npmName}/settings: put: tags: @@ -4050,6 +4151,7 @@ paths: description: successful operation '404': description: plugin not found + /plugins/{npmName}/public-settings: get: tags: @@ -4067,6 +4169,7 @@ paths: additionalProperties: true '404': description: plugin not found + /plugins/{npmName}/registered-settings: get: tags: @@ -4087,6 +4190,7 @@ paths: additionalProperties: true '404': description: plugin not found + servers: - url: 'https://peertube2.cpy.re/api/v1' description: Live Test Server (live data - latest nightly version) -- cgit v1.2.3