added descriptions for video files/import fields in openapi spec

pull/4107/head
Rigel Kent 2021-05-11 01:50:36 +02:00
parent de3876b815
commit 2c4876f215
No known key found for this signature in database
GPG Key ID: 5E53E96A494E452F
1 changed files with 39 additions and 13 deletions

View File

@ -1679,14 +1679,13 @@ paths:
type: string type: string
format: binary format: binary
targetUrl: targetUrl:
description: HTTP target URL $ref: '#/components/schemas/VideoImport/properties/targetUrl'
type: string
magnetUri: magnetUri:
description: Magnet URI $ref: '#/components/schemas/VideoImport/properties/magnetUri'
type: string
channelId: channelId:
description: Channel id that will contain this video description: Channel id that will contain this video
type: integer allOf:
- $ref: '#/components/schemas/VideoChannel/properties/id'
thumbnailfile: thumbnailfile:
description: Video thumbnail file description: Video thumbnail file
type: string type: string
@ -4425,6 +4424,7 @@ components:
`0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos. `0` is used as a special value for stillimage videos dedicated to audio, a.k.a. audio-only videos.
example: 240 example: 240
VideoResolutionConstant: VideoResolutionConstant:
description: resolutions and their labels for the video
properties: properties:
id: id:
$ref: '#/components/schemas/VideoResolutionSet' $ref: '#/components/schemas/VideoResolutionSet'
@ -4490,14 +4490,19 @@ components:
allOf: allOf:
- $ref: '#/components/schemas/Video' - $ref: '#/components/schemas/Video'
VideoFile: VideoFile:
readOnly: true
properties: properties:
magnetUri: magnetUri:
type: string type: string
format: uri
description: magnet URI allowing to resolve the video via BitTorrent without a metainfo file
example: magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.torrent&xt=urn:btih:38b4747ff788b30bf61f59d1965cd38f9e48e01f&dn=What+is+PeerTube%3F&tr=wss%3A%2F%2Fframatube.org%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.mp4
pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
resolution: resolution:
$ref: '#/components/schemas/VideoResolutionConstant' $ref: '#/components/schemas/VideoResolutionConstant'
size: size:
type: integer type: integer
description: 'Video file size in bytes' description: Video file size in bytes
torrentUrl: torrentUrl:
type: string type: string
description: Direct URL of the torrent file description: Direct URL of the torrent file
@ -4516,9 +4521,11 @@ components:
format: url format: url
fps: fps:
type: number type: number
description: Frames per second of the video file
metadataUrl: metadataUrl:
type: string type: string
format: url format: url
description: URL dereferencing the output of ffprobe on the file
VideoStreamingPlaylists: VideoStreamingPlaylists:
allOf: allOf:
- type: object - type: object
@ -4719,6 +4726,9 @@ components:
items: items:
type: string type: string
format: url format: url
example:
- https://peertube2.cpy.re/tracker/announce
- wss://peertube2.cpy.re/tracker/socket
files: files:
type: array type: array
items: items:
@ -4803,11 +4813,14 @@ components:
targetUrl: targetUrl:
type: string type: string
format: url format: url
description: remote URL where to find the import's source video
example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d example: https://framatube.org/videos/watch/9c9de5e8-0a1e-484a-b099-e80766180a6d
magnetUri: magnetUri:
type: string type: string
format: uri format: uri
description: magnet URI allowing to resolve the import's source video
example: magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.torrent&xt=urn:btih:38b4747ff788b30bf61f59d1965cd38f9e48e01f&dn=What+is+PeerTube%3F&tr=wss%3A%2F%2Fframatube.org%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.mp4 example: magnet:?xs=https%3A%2F%2Fframatube.org%2Fstatic%2Ftorrents%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.torrent&xt=urn:btih:38b4747ff788b30bf61f59d1965cd38f9e48e01f&dn=What+is+PeerTube%3F&tr=wss%3A%2F%2Fframatube.org%2Ftracker%2Fsocket&tr=https%3A%2F%2Fframatube.org%2Ftracker%2Fannounce&ws=https%3A%2F%2Fframatube.org%2Fstatic%2Fwebseed%2F9c9de5e8-0a1e-484a-b099-e80766180a6d-240.mp4
pattern: /magnet:\?xt=urn:[a-z0-9]+:[a-z0-9]{32}/i
torrentName: torrentName:
type: string type: string
state: state:
@ -4821,7 +4834,9 @@ components:
type: string type: string
format: date-time format: date-time
video: video:
$ref: '#/components/schemas/Video' nullable: true
allOf:
- $ref: '#/components/schemas/Video'
VideoImportsList: VideoImportsList:
properties: properties:
total: total:
@ -5020,16 +5035,24 @@ components:
type: string type: string
format: url format: url
name: name:
type: string description: immutable name of the actor
allOf:
- $ref: '#/components/schemas/username'
host: host:
type: string type: string
format: hostname format: hostname
description: server on which the actor is resident
hostRedundancyAllowed: hostRedundancyAllowed:
type: boolean type: boolean
description: whether this actor's host allows redundancy of its videos
followingCount: followingCount:
type: integer type: integer
minimum: 0
description: number of actors subscribed to by this actor, as seen by this instance
followersCount: followersCount:
type: integer type: integer
minimum: 0
description: number of followers of this actor, as seen by this instance
createdAt: createdAt:
type: string type: string
format: date-time format: date-time
@ -5043,11 +5066,15 @@ components:
- $ref: '#/components/schemas/Actor' - $ref: '#/components/schemas/Actor'
- properties: - properties:
userId: userId:
$ref: '#/components/schemas/id' description: object id for the user tied to this account
allOf:
- $ref: '#/components/schemas/User/properties/id'
displayName: displayName:
type: string type: string
description: name displayed on the account's profile
description: description:
type: string type: string
description: text or bio displayed on the account's profile
UserWatchingVideo: UserWatchingVideo:
properties: properties:
currentTime: currentTime:
@ -5698,7 +5725,8 @@ components:
type: boolean type: boolean
description: Has the user confirmed their email address? description: Has the user confirmed their email address?
id: id:
type: integer allOf:
- $ref: '#/components/schemas/id'
readOnly: true readOnly: true
pluginAuth: pluginAuth:
type: string type: string
@ -6225,9 +6253,7 @@ components:
type: string type: string
nullable: true nullable: true
magnetUri: magnetUri:
type: string $ref: '#/components/schemas/VideoImport/properties/magnetUri'
format: uri
nullable: true
targetUri: targetUri:
type: string type: string
format: uri format: uri