mirror of https://github.com/Chocobozzz/PeerTube
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 filepull/267/head
parent
42f1923430
commit
c360c49456
|
@ -331,7 +331,7 @@ paths:
|
||||||
description: successful operation
|
description: successful operation
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/Avatar'
|
$ref: '#/definitions/Avatar'
|
||||||
/video:
|
/videos:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
|
@ -346,7 +346,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/Video'
|
$ref: '#/definitions/Video'
|
||||||
/video/categories:
|
/videos/categories:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
|
@ -361,7 +361,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
/video/licences:
|
/videos/licences:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
|
@ -376,7 +376,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
/video/languages:
|
/videos/languages:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
|
@ -391,7 +391,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
/video/privacies:
|
/videos/privacies:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
|
@ -406,7 +406,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
/video/search:
|
/videos/search:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
|
@ -421,7 +421,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/Video'
|
$ref: '#/definitions/Video'
|
||||||
"/video/{id}":
|
"/videos/{id}":
|
||||||
put:
|
put:
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
|
@ -474,7 +474,7 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
'204':
|
'204':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
"/video/{id}/description":
|
"/videos/{id}/description":
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
|
@ -493,7 +493,7 @@ paths:
|
||||||
description: successful operation
|
description: successful operation
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
"/video/{id}/views":
|
"/videos/{id}/views":
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
|
@ -510,7 +510,7 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
'204':
|
'204':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
/video/upload:
|
/videos/upload:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- Video
|
- Video
|
||||||
|
@ -528,7 +528,7 @@ paths:
|
||||||
description: successful operation
|
description: successful operation
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/VideoUploadResponse'
|
$ref: '#/definitions/VideoUploadResponse'
|
||||||
/video/abuse:
|
/videos/abuse:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- VideoAbuse
|
- VideoAbuse
|
||||||
|
@ -543,7 +543,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/VideoAbuse'
|
$ref: '#/definitions/VideoAbuse'
|
||||||
"/video/{id}/abuse":
|
"/videos/{id}/abuse":
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- VideoAbuse
|
- VideoAbuse
|
||||||
|
@ -560,7 +560,7 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
'204':
|
'204':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
"/video/{videoId}/blacklist":
|
"/videos/{videoId}/blacklist":
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- VideoBlacklist
|
- VideoBlacklist
|
||||||
|
@ -593,7 +593,7 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
'204':
|
'204':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
/video/blacklist:
|
/videos/blacklist:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- VideoBlacklist
|
- VideoBlacklist
|
||||||
|
@ -608,7 +608,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/VideoBlacklist'
|
$ref: '#/definitions/VideoBlacklist'
|
||||||
/video/channels:
|
/videos/channels:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- VideoChannel
|
- VideoChannel
|
||||||
|
@ -638,7 +638,7 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
'204':
|
'204':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
"/video/channels/{id}":
|
"/videos/channels/{id}":
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- VideoChannel
|
- VideoChannel
|
||||||
|
@ -693,7 +693,7 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
'204':
|
'204':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
/video/accounts/{accountId}/channels:
|
/videos/accounts/{accountId}/channels:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- VideoChannel
|
- VideoChannel
|
||||||
|
@ -714,7 +714,7 @@ paths:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/VideoChannel'
|
$ref: '#/definitions/VideoChannel'
|
||||||
"/video/{videoId}/comment-threads":
|
"/videos/{videoId}/comment-threads":
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- VideoComment
|
- VideoComment
|
||||||
|
@ -732,9 +732,7 @@ paths:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
schema:
|
schema:
|
||||||
items:
|
$ref: '#/definitions/CommentThreadResponse'
|
||||||
type: array
|
|
||||||
$ref: '#/definitions/VideoComment'
|
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- VideoComment
|
- VideoComment
|
||||||
|
@ -751,7 +749,9 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
"/video/{videoId}/comment-threads/{threadId}":
|
schema:
|
||||||
|
$ref: '#/definitions/CommentThreadPostResponse'
|
||||||
|
"/videos/{videoId}/comment-threads/{threadId}":
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- VideoComment
|
- VideoComment
|
||||||
|
@ -775,7 +775,7 @@ paths:
|
||||||
description: successful operation
|
description: successful operation
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/VideoCommentThreadTree'
|
$ref: '#/definitions/VideoCommentThreadTree'
|
||||||
"/video/{videoId}/comments/{commentId}":
|
"/videos/{videoId}/comments/{commentId}":
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- VideoComment
|
- VideoComment
|
||||||
|
@ -797,6 +797,8 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/CommentThreadPostResponse'
|
||||||
delete:
|
delete:
|
||||||
tags:
|
tags:
|
||||||
- VideoComment
|
- VideoComment
|
||||||
|
@ -818,7 +820,7 @@ paths:
|
||||||
responses:
|
responses:
|
||||||
'204':
|
'204':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
"/video/{id}/rate":
|
"/videos/{id}/rate":
|
||||||
put:
|
put:
|
||||||
tags:
|
tags:
|
||||||
- VideoRate
|
- VideoRate
|
||||||
|
@ -1126,8 +1128,20 @@ definitions:
|
||||||
type: number
|
type: number
|
||||||
uuid:
|
uuid:
|
||||||
type: string
|
type: string
|
||||||
|
CommentThreadResponse:
|
||||||
|
properties:
|
||||||
|
total:
|
||||||
|
type: number
|
||||||
|
data:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/definitions/VideoComment"
|
||||||
|
CommentThreadPostResponse:
|
||||||
|
properties:
|
||||||
|
comment:
|
||||||
|
$ref: "#/definitions/VideoComment"
|
||||||
|
|
||||||
#input bodies
|
#request bodies
|
||||||
AddUser:
|
AddUser:
|
||||||
properties:
|
properties:
|
||||||
username:
|
username:
|
||||||
|
|
Loading…
Reference in New Issue