aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDimitri Gilbert <dimitri.gilbert@gmail.com>2018-01-25 18:39:51 +0100
committerChocobozzz <me@florianbigard.com>2018-01-25 18:39:51 +0100
commitc360c49456a27529268722fb7c645819cff59486 (patch)
treede3d28d52a156fbbf49d4ca9db6d0efb7497a23d
parent42f192343035dd56ecd67cc578a7984393a940e5 (diff)
downloadPeerTube-c360c49456a27529268722fb7c645819cff59486.tar.gz
PeerTube-c360c49456a27529268722fb7c645819cff59486.tar.zst
PeerTube-c360c49456a27529268722fb7c645819cff59486.zip
Api doc improvement (#252)
* Basic api documentation * fix styling issue * fix styling issue * gitignore unecessary folders * openApi 2.0 first draft * solved conflicts * solved errors in openapi file * added missing doc on video + deleted apidoc comments * fix last warnings and errors inopenapi definition * openapi fix typo + improvement on video/comment endpoints * removed misplaced openapi file
-rw-r--r--support/doc/api/openapi.yaml64
1 files changed, 39 insertions, 25 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 8ba784d4b..f00e40737 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -331,7 +331,7 @@ paths:
331 description: successful operation 331 description: successful operation
332 schema: 332 schema:
333 $ref: '#/definitions/Avatar' 333 $ref: '#/definitions/Avatar'
334 /video: 334 /videos:
335 get: 335 get:
336 tags: 336 tags:
337 - Video 337 - Video
@@ -346,7 +346,7 @@ paths:
346 type: array 346 type: array
347 items: 347 items:
348 $ref: '#/definitions/Video' 348 $ref: '#/definitions/Video'
349 /video/categories: 349 /videos/categories:
350 get: 350 get:
351 tags: 351 tags:
352 - Video 352 - Video
@@ -361,7 +361,7 @@ paths:
361 type: array 361 type: array
362 items: 362 items:
363 type: string 363 type: string
364 /video/licences: 364 /videos/licences:
365 get: 365 get:
366 tags: 366 tags:
367 - Video 367 - Video
@@ -376,7 +376,7 @@ paths:
376 type: array 376 type: array
377 items: 377 items:
378 type: string 378 type: string
379 /video/languages: 379 /videos/languages:
380 get: 380 get:
381 tags: 381 tags:
382 - Video 382 - Video
@@ -391,7 +391,7 @@ paths:
391 type: array 391 type: array
392 items: 392 items:
393 type: string 393 type: string
394 /video/privacies: 394 /videos/privacies:
395 get: 395 get:
396 tags: 396 tags:
397 - Video 397 - Video
@@ -406,7 +406,7 @@ paths:
406 type: array 406 type: array
407 items: 407 items:
408 type: string 408 type: string
409 /video/search: 409 /videos/search:
410 get: 410 get:
411 tags: 411 tags:
412 - Video 412 - Video
@@ -421,7 +421,7 @@ paths:
421 type: array 421 type: array
422 items: 422 items:
423 $ref: '#/definitions/Video' 423 $ref: '#/definitions/Video'
424 "/video/{id}": 424 "/videos/{id}":
425 put: 425 put:
426 tags: 426 tags:
427 - Video 427 - Video
@@ -474,7 +474,7 @@ paths:
474 responses: 474 responses:
475 '204': 475 '204':
476 description: successful operation 476 description: successful operation
477 "/video/{id}/description": 477 "/videos/{id}/description":
478 get: 478 get:
479 tags: 479 tags:
480 - Video 480 - Video
@@ -493,7 +493,7 @@ paths:
493 description: successful operation 493 description: successful operation
494 schema: 494 schema:
495 type: string 495 type: string
496 "/video/{id}/views": 496 "/videos/{id}/views":
497 post: 497 post:
498 tags: 498 tags:
499 - Video 499 - Video
@@ -510,7 +510,7 @@ paths:
510 responses: 510 responses:
511 '204': 511 '204':
512 description: successful operation 512 description: successful operation
513 /video/upload: 513 /videos/upload:
514 post: 514 post:
515 tags: 515 tags:
516 - Video 516 - Video
@@ -528,7 +528,7 @@ paths:
528 description: successful operation 528 description: successful operation
529 schema: 529 schema:
530 $ref: '#/definitions/VideoUploadResponse' 530 $ref: '#/definitions/VideoUploadResponse'
531 /video/abuse: 531 /videos/abuse:
532 get: 532 get:
533 tags: 533 tags:
534 - VideoAbuse 534 - VideoAbuse
@@ -543,7 +543,7 @@ paths:
543 type: array 543 type: array
544 items: 544 items:
545 $ref: '#/definitions/VideoAbuse' 545 $ref: '#/definitions/VideoAbuse'
546 "/video/{id}/abuse": 546 "/videos/{id}/abuse":
547 post: 547 post:
548 tags: 548 tags:
549 - VideoAbuse 549 - VideoAbuse
@@ -560,7 +560,7 @@ paths:
560 responses: 560 responses:
561 '204': 561 '204':
562 description: successful operation 562 description: successful operation
563 "/video/{videoId}/blacklist": 563 "/videos/{videoId}/blacklist":
564 post: 564 post:
565 tags: 565 tags:
566 - VideoBlacklist 566 - VideoBlacklist
@@ -593,7 +593,7 @@ paths:
593 responses: 593 responses:
594 '204': 594 '204':
595 description: successful operation 595 description: successful operation
596 /video/blacklist: 596 /videos/blacklist:
597 get: 597 get:
598 tags: 598 tags:
599 - VideoBlacklist 599 - VideoBlacklist
@@ -608,7 +608,7 @@ paths:
608 type: array 608 type: array
609 items: 609 items:
610 $ref: '#/definitions/VideoBlacklist' 610 $ref: '#/definitions/VideoBlacklist'
611 /video/channels: 611 /videos/channels:
612 get: 612 get:
613 tags: 613 tags:
614 - VideoChannel 614 - VideoChannel
@@ -638,7 +638,7 @@ paths:
638 responses: 638 responses:
639 '204': 639 '204':
640 description: successful operation 640 description: successful operation
641 "/video/channels/{id}": 641 "/videos/channels/{id}":
642 get: 642 get:
643 tags: 643 tags:
644 - VideoChannel 644 - VideoChannel
@@ -693,7 +693,7 @@ paths:
693 responses: 693 responses:
694 '204': 694 '204':
695 description: successful operation 695 description: successful operation
696 /video/accounts/{accountId}/channels: 696 /videos/accounts/{accountId}/channels:
697 get: 697 get:
698 tags: 698 tags:
699 - VideoChannel 699 - VideoChannel
@@ -714,7 +714,7 @@ paths:
714 type: array 714 type: array
715 items: 715 items:
716 $ref: '#/definitions/VideoChannel' 716 $ref: '#/definitions/VideoChannel'
717 "/video/{videoId}/comment-threads": 717 "/videos/{videoId}/comment-threads":
718 get: 718 get:
719 tags: 719 tags:
720 - VideoComment 720 - VideoComment
@@ -732,9 +732,7 @@ paths:
732 '200': 732 '200':
733 description: successful operation 733 description: successful operation
734 schema: 734 schema:
735 items: 735 $ref: '#/definitions/CommentThreadResponse'
736 type: array
737 $ref: '#/definitions/VideoComment'
738 post: 736 post:
739 tags: 737 tags:
740 - VideoComment 738 - VideoComment
@@ -751,7 +749,9 @@ paths:
751 responses: 749 responses:
752 '200': 750 '200':
753 description: successful operation 751 description: successful operation
754 "/video/{videoId}/comment-threads/{threadId}": 752 schema:
753 $ref: '#/definitions/CommentThreadPostResponse'
754 "/videos/{videoId}/comment-threads/{threadId}":
755 get: 755 get:
756 tags: 756 tags:
757 - VideoComment 757 - VideoComment
@@ -775,7 +775,7 @@ paths:
775 description: successful operation 775 description: successful operation
776 schema: 776 schema:
777 $ref: '#/definitions/VideoCommentThreadTree' 777 $ref: '#/definitions/VideoCommentThreadTree'
778 "/video/{videoId}/comments/{commentId}": 778 "/videos/{videoId}/comments/{commentId}":
779 post: 779 post:
780 tags: 780 tags:
781 - VideoComment 781 - VideoComment
@@ -797,6 +797,8 @@ paths:
797 responses: 797 responses:
798 '200': 798 '200':
799 description: successful operation 799 description: successful operation
800 schema:
801 $ref: '#/definitions/CommentThreadPostResponse'
800 delete: 802 delete:
801 tags: 803 tags:
802 - VideoComment 804 - VideoComment
@@ -818,7 +820,7 @@ paths:
818 responses: 820 responses:
819 '204': 821 '204':
820 description: successful operation 822 description: successful operation
821 "/video/{id}/rate": 823 "/videos/{id}/rate":
822 put: 824 put:
823 tags: 825 tags:
824 - VideoRate 826 - VideoRate
@@ -1126,8 +1128,20 @@ definitions:
1126 type: number 1128 type: number
1127 uuid: 1129 uuid:
1128 type: string 1130 type: string
1131 CommentThreadResponse:
1132 properties:
1133 total:
1134 type: number
1135 data:
1136 type: array
1137 items:
1138 $ref: "#/definitions/VideoComment"
1139 CommentThreadPostResponse:
1140 properties:
1141 comment:
1142 $ref: "#/definitions/VideoComment"
1129 1143
1130#input bodies 1144#request bodies
1131 AddUser: 1145 AddUser:
1132 properties: 1146 properties:
1133 username: 1147 username: