Fix openapi schema

pull/1958/head
Chocobozzz 2019-07-03 17:28:09 +02:00
parent d89954ff0b
commit cb9d028a6b
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 44 additions and 32 deletions

View File

@ -638,7 +638,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/VideoListResponse' $ref: '#/components/schemas/VideoListResponse'
'/users/me/subscriptions/{uri}': '/users/me/subscriptions/{subscriptionHandle}':
get: get:
summary: Get subscription of the current user for a given uri summary: Get subscription of the current user for a given uri
security: security:
@ -646,6 +646,8 @@ paths:
- user - user
tags: tags:
- User - User
parameters:
- $ref: '#/components/parameters/subscriptionHandle'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -660,6 +662,8 @@ paths:
- user - user
tags: tags:
- User - User
parameters:
- $ref: '#/components/parameters/subscriptionHandle'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -792,7 +796,7 @@ paths:
tags: tags:
- Video - Video
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -851,7 +855,7 @@ paths:
tags: tags:
- Video - Video
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -866,7 +870,7 @@ paths:
tags: tags:
- Video - Video
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
responses: responses:
'204': '204':
$ref: '#/paths/~1users~1me/put/responses/204' $ref: '#/paths/~1users~1me/put/responses/204'
@ -876,7 +880,7 @@ paths:
tags: tags:
- Video - Video
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -890,7 +894,7 @@ paths:
tags: tags:
- Video - Video
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
responses: responses:
'204': '204':
$ref: '#/paths/~1users~1me/put/responses/204' $ref: '#/paths/~1users~1me/put/responses/204'
@ -902,7 +906,7 @@ paths:
security: security:
- OAuth2: [] - OAuth2: []
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
requestBody: requestBody:
content: content:
application/json: application/json:
@ -919,8 +923,6 @@ paths:
- Video - Video
security: security:
- OAuth2: [] - OAuth2: []
parameters:
- $ref: '#/components/parameters/id2'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -932,7 +934,7 @@ paths:
security: security:
- OAuth2: [] - OAuth2: []
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
responses: responses:
'204': '204':
$ref: '#/paths/~1users~1me/put/responses/204' $ref: '#/paths/~1users~1me/put/responses/204'
@ -944,7 +946,7 @@ paths:
security: security:
- OAuth2: [] - OAuth2: []
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
responses: responses:
'204': '204':
$ref: '#/paths/~1users~1me/put/responses/204' $ref: '#/paths/~1users~1me/put/responses/204'
@ -956,7 +958,7 @@ paths:
security: security:
- OAuth2: [] - OAuth2: []
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
requestBody: requestBody:
required: true required: true
content: content:
@ -1178,7 +1180,7 @@ paths:
tags: tags:
- Video Abuse - Video Abuse
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
responses: responses:
'204': '204':
$ref: '#/paths/~1users~1me/put/responses/204' $ref: '#/paths/~1users~1me/put/responses/204'
@ -1192,7 +1194,7 @@ paths:
tags: tags:
- Video Blacklist - Video Blacklist
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
responses: responses:
'204': '204':
$ref: '#/paths/~1users~1me/put/responses/204' $ref: '#/paths/~1users~1me/put/responses/204'
@ -1205,7 +1207,7 @@ paths:
tags: tags:
- Video Blacklist - Video Blacklist
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
responses: responses:
'204': '204':
$ref: '#/paths/~1users~1me/put/responses/204' $ref: '#/paths/~1users~1me/put/responses/204'
@ -1237,7 +1239,7 @@ paths:
tags: tags:
- Video Caption - Video Caption
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -1258,7 +1260,7 @@ paths:
tags: tags:
- Video Caption - Video Caption
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
- $ref: '#/components/parameters/captionLanguage' - $ref: '#/components/parameters/captionLanguage'
requestBody: requestBody:
content: content:
@ -1278,7 +1280,7 @@ paths:
tags: tags:
- Video Caption - Video Caption
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
- $ref: '#/components/parameters/captionLanguage' - $ref: '#/components/parameters/captionLanguage'
responses: responses:
'204': '204':
@ -1395,6 +1397,7 @@ paths:
tags: tags:
- User - User
parameters: parameters:
- $ref: '#/components/parameters/name'
- $ref: '#/components/parameters/start' - $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/count' - $ref: '#/components/parameters/count'
- $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/sort'
@ -1422,7 +1425,7 @@ paths:
tags: tags:
- Video Comment - Video Comment
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
- $ref: '#/components/parameters/start' - $ref: '#/components/parameters/start'
- $ref: '#/components/parameters/count' - $ref: '#/components/parameters/count'
- $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/sort'
@ -1440,7 +1443,7 @@ paths:
tags: tags:
- Video Comment - Video Comment
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -1454,13 +1457,8 @@ paths:
tags: tags:
- Video Comment - Video Comment
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
- name: threadId - $ref: '#/components/parameters/threadId'
in: path
required: true
description: The thread id (root comment id)
schema:
type: number
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -1476,7 +1474,7 @@ paths:
tags: tags:
- Video Comment - Video Comment
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
- $ref: '#/components/parameters/commentId' - $ref: '#/components/parameters/commentId'
responses: responses:
'200': '200':
@ -1492,7 +1490,7 @@ paths:
tags: tags:
- Video Comment - Video Comment
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
- $ref: '#/components/parameters/commentId' - $ref: '#/components/parameters/commentId'
responses: responses:
'204': '204':
@ -1505,7 +1503,7 @@ paths:
tags: tags:
- Video Rate - Video Rate
parameters: parameters:
- $ref: '#/components/parameters/id2' - $ref: '#/components/parameters/idOrUUID'
responses: responses:
'204': '204':
$ref: '#/paths/~1users~1me/put/responses/204' $ref: '#/paths/~1users~1me/put/responses/204'
@ -1645,7 +1643,7 @@ components:
description: The user id description: The user id
schema: schema:
type: number type: number
id2: idOrUUID:
name: id name: id
in: path in: path
required: true required: true
@ -1666,10 +1664,24 @@ components:
description: "The video channel handle (example: 'my_username@example.com' or 'my_username')" description: "The video channel handle (example: 'my_username@example.com' or 'my_username')"
schema: schema:
type: string type: string
commentId: subscriptionHandle:
name: subscriptionHandle
in: path
required: true
description: "The subscription handle (example: 'my_username@example.com' or 'my_username')"
schema:
type: string
threadId:
name: threadId name: threadId
in: path in: path
required: true required: true
description: The thread id (root comment id)
schema:
type: number
commentId:
name: commentId
in: path
required: true
description: The comment id description: The comment id
schema: schema:
type: number type: number