1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Remove openapi warnings

This commit is contained in:
Chocobozzz 2025-09-09 10:43:51 +02:00
parent 6a43a72fec
commit e38c4ba0d1
No known key found for this signature in database
GPG key ID: 583A612D890159BE

View file

@ -1,4 +1,4 @@
openapi: 3.0.0 openapi: 3.0.3
info: info:
title: PeerTube title: PeerTube
version: 7.1.0 version: 7.1.0
@ -453,7 +453,7 @@ paths:
'404': '404':
description: not found description: not found
'/download/videos/generate/:videoId': '/download/videos/generate/{videoId}':
get: get:
tags: tags:
- Video Download - Video Download
@ -490,7 +490,7 @@ paths:
- name: format - name: format
in: path in: path
required: true required: true
description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))' description: 'format expected (we focus on making `rss` the most feature-rich ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
schema: schema:
type: string type: string
enum: enum:
@ -585,7 +585,7 @@ paths:
- name: format - name: format
in: path in: path
required: true required: true
description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))' description: 'format expected (we focus on making `rss` the most feature-rich ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
schema: schema:
type: string type: string
enum: enum:
@ -677,7 +677,7 @@ paths:
- name: format - name: format
in: path in: path
required: true required: true
description: 'format expected (we focus on making `rss` the most featureful ; it serves [Media RSS](https://www.rssboard.org/media-rss))' description: 'format expected (we focus on making `rss` the most feature-rich ; it serves [Media RSS](https://www.rssboard.org/media-rss))'
schema: schema:
type: string type: string
enum: enum:
@ -1569,6 +1569,7 @@ paths:
oneOf: oneOf:
- $ref: '#/components/schemas/OAuthToken-password' - $ref: '#/components/schemas/OAuthToken-password'
- $ref: '#/components/schemas/OAuthToken-refresh_token' - $ref: '#/components/schemas/OAuthToken-refresh_token'
- $ref: '#/components/schemas/OAuthToken-external_token'
discriminator: discriminator:
propertyName: grant_type propertyName: grant_type
mapping: mapping:
@ -3728,7 +3729,8 @@ paths:
type: boolean type: boolean
latencyMode: latencyMode:
description: User can select live latency mode if enabled by the instance description: User can select live latency mode if enabled by the instance
$ref: '#/components/schemas/LiveVideoLatencyMode' allOf:
- $ref: '#/components/schemas/LiveVideoLatencyMode'
thumbnailfile: thumbnailfile:
description: Live video/replay thumbnail file description: Live video/replay thumbnail file
type: string type: string
@ -5991,9 +5993,6 @@ paths:
description: Get videos that have this maximum duration description: Get videos that have this maximum duration
schema: schema:
type: integer type: integer
callbacks:
'searchTarget === search-index':
$ref: '#/components/callbacks/searchIndex'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -6027,9 +6026,6 @@ paths:
- $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/sort'
- $ref: '#/components/parameters/host' - $ref: '#/components/parameters/host'
- $ref: '#/components/parameters/handles' - $ref: '#/components/parameters/handles'
callbacks:
'searchTarget === search-index':
$ref: '#/components/callbacks/searchIndex'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -6063,9 +6059,6 @@ paths:
- $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/sort'
- $ref: '#/components/parameters/host' - $ref: '#/components/parameters/host'
- $ref: '#/components/parameters/uuids' - $ref: '#/components/parameters/uuids'
callbacks:
'searchTarget === search-index':
$ref: '#/components/callbacks/searchIndex'
responses: responses:
'200': '200':
description: successful operation description: successful operation
@ -8694,7 +8687,6 @@ components:
allOf: allOf:
- $ref: '#/components/schemas/Video' - $ref: '#/components/schemas/Video'
VideoFile: VideoFile:
readOnly: true
properties: properties:
id: id:
$ref: '#/components/schemas/id' $ref: '#/components/schemas/id'
@ -9123,9 +9115,7 @@ components:
VideoImport: VideoImport:
properties: properties:
id: id:
readOnly: true $ref: '#/components/schemas/id'
allOf:
- $ref: '#/components/schemas/id'
targetUrl: targetUrl:
type: string type: string
format: url format: url
@ -9137,30 +9127,23 @@ components:
description: magnet URI allowing to resolve the import's source video description: magnet URI allowing to resolve the import's source video
pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
torrentfile: torrentfile:
writeOnly: true
type: string type: string
format: binary format: binary
description: Torrent file containing only the video file description: Torrent file containing only the video file
torrentName: torrentName:
readOnly: true
type: string type: string
state: state:
readOnly: true
allOf: allOf:
- $ref: '#/components/schemas/VideoImportStateConstant' - $ref: '#/components/schemas/VideoImportStateConstant'
error: error:
readOnly: true
type: string type: string
createdAt: createdAt:
readOnly: true
type: string type: string
format: date-time format: date-time
updatedAt: updatedAt:
readOnly: true
type: string type: string
format: date-time format: date-time
video: video:
readOnly: true
nullable: true nullable: true
allOf: allOf:
- $ref: '#/components/schemas/Video' - $ref: '#/components/schemas/Video'
@ -9435,8 +9418,9 @@ components:
type: string type: string
description: "**PeerTube >= 6.1** If enabled by the admin, the video source file is kept on the server and can be downloaded by the owner" description: "**PeerTube >= 6.1** If enabled by the admin, the video source file is kept on the server and can be downloaded by the owner"
resolution: resolution:
$ref: '#/components/schemas/VideoResolutionConstant'
description: "**PeerTube >= 6.1**" description: "**PeerTube >= 6.1**"
allOf:
- $ref: '#/components/schemas/VideoResolutionConstant'
size: size:
type: integer type: integer
description: "**PeerTube >= 6.1** Video file size in bytes" description: "**PeerTube >= 6.1** Video file size in bytes"
@ -9564,9 +9548,10 @@ components:
description: > description: >
Client software used to watch the video. For example "Firefox", "PeerTube Approval Android", etc. Client software used to watch the video. For example "Firefox", "PeerTube Approval Android", etc.
device: device:
$ref: '#/components/schemas/VideoStatsUserAgentDevice'
description: > description: >
Device used to watch the video. For example "desktop", "mobile", "smarttv", etc. Device used to watch the video. For example "desktop", "mobile", "smarttv", etc.
allOf:
- $ref: '#/components/schemas/VideoStatsUserAgentDevice'
operatingSystem: operatingSystem:
type: string type: string
description: > description: >
@ -10688,9 +10673,7 @@ components:
type: boolean type: boolean
description: Has the user confirmed their email address? description: Has the user confirmed their email address?
id: id:
allOf: $ref: '#/components/schemas/id'
- $ref: '#/components/schemas/id'
readOnly: true
pluginAuth: pluginAuth:
type: string type: string
description: Auth plugin to use to authenticate the user description: Auth plugin to use to authenticate the user
@ -11035,8 +11018,6 @@ components:
type: string type: string
enum: enum:
- password - password
- refresh_token
default: password
username: username:
$ref: '#/components/schemas/User/properties/username' $ref: '#/components/schemas/User/properties/username'
password: password:
@ -11055,9 +11036,7 @@ components:
grant_type: grant_type:
type: string type: string
enum: enum:
- password
- refresh_token - refresh_token
default: password
refresh_token: refresh_token:
type: string type: string
example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7 example: 2e0d675df9fc96d2e4ec8a3ebbbf45eca9137bb7
@ -11066,6 +11045,26 @@ components:
- client_secret - client_secret
- grant_type - grant_type
- refresh_token - refresh_token
OAuthToken-external_token:
allOf:
- $ref: '#/components/schemas/OAuthClient'
- type: object
properties:
grant_type:
type: string
enum:
- password
username:
$ref: '#/components/schemas/User/properties/username'
externalAuthToken:
type: string
description: If you want to authenticate using an external authentication token you got from an auth plugin (like `peertube-plugin-auth-openid-connect` for example) instead of a username/password or a refresh token, provide it here.
required:
- client_id
- client_secret
- grant_type
- username
- externalAuthToken
VideoChannel: VideoChannel:
allOf: allOf:
@ -11092,10 +11091,8 @@ components:
minLength: 3 minLength: 3
maxLength: 1000 maxLength: 1000
isLocal: isLocal:
readOnly: true
type: boolean type: boolean
updatedAt: updatedAt:
readOnly: true
type: string type: string
format: date-time format: date-time
banners: banners:
@ -11493,7 +11490,8 @@ components:
$ref: '#/components/schemas/id' $ref: '#/components/schemas/id'
video: video:
nullable: true nullable: true
$ref: '#/components/schemas/VideoInfo' allOf:
- $ref: '#/components/schemas/VideoInfo'
torrentName: torrentName:
type: string type: string
nullable: true nullable: true
@ -11648,7 +11646,8 @@ components:
type: boolean type: boolean
latencyMode: latencyMode:
description: User can select live latency mode if enabled by the instance description: User can select live latency mode if enabled by the instance
$ref: '#/components/schemas/LiveVideoLatencyMode' allOf:
- $ref: '#/components/schemas/LiveVideoLatencyMode'
schedules: schedules:
type: array type: array
items: items:
@ -11674,7 +11673,8 @@ components:
type: boolean type: boolean
latencyMode: latencyMode:
description: User can select live latency mode if enabled by the instance description: User can select live latency mode if enabled by the instance
$ref: '#/components/schemas/LiveVideoLatencyMode' allOf:
- $ref: '#/components/schemas/LiveVideoLatencyMode'
schedules: schedules:
type: array type: array
items: items:
@ -12191,15 +12191,3 @@ components:
The file storage type: The file storage type:
- `0` File system - `0` File system
- `1` Object storage - `1` Object storage
callbacks:
searchIndex:
'https://search.example.org/api/v1/search/videos':
post:
summary: third-party search index MAY be used instead of the local index, if enabled by the instance admin. see `searchTarget`
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/VideoListResponse'