aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/api
diff options
context:
space:
mode:
authorFrank Sträter <fstrater@beeldengeluid.nl>2019-08-21 08:32:15 +0200
committerChocobozzz <me@florianbigard.com>2019-08-21 08:32:15 +0200
commit0ad45af705cb3870642f7b147334100112e19e46 (patch)
tree01cf66c1e2418c76e8370acf4fda339847c4a97d /support/doc/api
parentee7ea34e6211d3b19a325e4fe8c464c24005bcac (diff)
downloadPeerTube-0ad45af705cb3870642f7b147334100112e19e46.tar.gz
PeerTube-0ad45af705cb3870642f7b147334100112e19e46.tar.zst
PeerTube-0ad45af705cb3870642f7b147334100112e19e46.zip
Improved description of all file uploads (#2053)
* Add format:binary for file uploads * Fix wrongly named field for encoding * Fix typo in field name * Add contentType for torrentfile and captionfile * Add contentType for videofile
Diffstat (limited to 'support/doc/api')
-rw-r--r--support/doc/api/openapi.yaml33
1 files changed, 30 insertions, 3 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 78159f89c..89d440748 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -726,8 +726,7 @@ paths:
726 type: string 726 type: string
727 format: binary 727 format: binary
728 encoding: 728 encoding:
729 profileImage: 729 avatarfile:
730 # only accept png/jpeg
731 contentType: image/png, image/jpeg 730 contentType: image/png, image/jpeg
732 /videos: 731 /videos:
733 get: 732 get:
@@ -829,9 +828,11 @@ paths:
829 thumbnailfile: 828 thumbnailfile:
830 description: Video thumbnail file 829 description: Video thumbnail file
831 type: string 830 type: string
831 format: binary
832 previewfile: 832 previewfile:
833 description: Video preview file 833 description: Video preview file
834 type: string 834 type: string
835 format: binary
835 category: 836 category:
836 description: Video category 837 description: Video category
837 type: string 838 type: string
@@ -874,6 +875,11 @@ paths:
874 format: date-time 875 format: date-time
875 scheduleUpdate: 876 scheduleUpdate:
876 $ref: '#/components/schemas/VideoScheduledUpdate' 877 $ref: '#/components/schemas/VideoScheduledUpdate'
878 encoding:
879 thumbnailfile:
880 contentType: image/jpeg
881 previewfile:
882 contentType: image/jpeg
877 get: 883 get:
878 summary: Get a video by its id 884 summary: Get a video by its id
879 tags: 885 tags:
@@ -1029,9 +1035,11 @@ paths:
1029 thumbnailfile: 1035 thumbnailfile:
1030 description: Video thumbnail file 1036 description: Video thumbnail file
1031 type: string 1037 type: string
1038 format: binary
1032 previewfile: 1039 previewfile:
1033 description: Video preview file 1040 description: Video preview file
1034 type: string 1041 type: string
1042 format: binary
1035 privacy: 1043 privacy:
1036 $ref: '#/components/schemas/VideoPrivacySet' 1044 $ref: '#/components/schemas/VideoPrivacySet'
1037 category: 1045 category:
@@ -1080,6 +1088,13 @@ paths:
1080 - videofile 1088 - videofile
1081 - channelId 1089 - channelId
1082 - name 1090 - name
1091 encoding:
1092 videofile:
1093 contentType: video/mp4, video/webm, video/ogg, video/avi, video/quicktime, video/x-msvideo, video/x-flv, video/x-matroska, application/octet-stream
1094 thumbnailfile:
1095 contentType: image/jpeg
1096 previewfile:
1097 contentType: image/jpeg
1083 x-code-samples: 1098 x-code-samples:
1084 - lang: Shell 1099 - lang: Shell
1085 source: | 1100 source: |
@@ -1142,9 +1157,11 @@ paths:
1142 thumbnailfile: 1157 thumbnailfile:
1143 description: Video thumbnail file 1158 description: Video thumbnail file
1144 type: string 1159 type: string
1160 format: binary
1145 previewfile: 1161 previewfile:
1146 description: Video preview file 1162 description: Video preview file
1147 type: string 1163 type: string
1164 format: binary
1148 privacy: 1165 privacy:
1149 $ref: '#/components/schemas/VideoPrivacySet' 1166 $ref: '#/components/schemas/VideoPrivacySet'
1150 category: 1167 category:
@@ -1188,6 +1205,13 @@ paths:
1188 required: 1205 required:
1189 - channelId 1206 - channelId
1190 - name 1207 - name
1208 encoding:
1209 torrentfile:
1210 contentType: application/x-bittorrent
1211 thumbnailfile:
1212 contentType: image/jpeg
1213 previewfile:
1214 contentType: image/jpeg
1191 /videos/abuse: 1215 /videos/abuse:
1192 get: 1216 get:
1193 summary: Get list of reported video abuses 1217 summary: Get list of reported video abuses
@@ -1308,6 +1332,9 @@ paths:
1308 description: The file to upload. 1332 description: The file to upload.
1309 type: string 1333 type: string
1310 format: binary 1334 format: binary
1335 encoding:
1336 captionfile:
1337 contentType: text/vtt, application/x-subrip
1311 responses: 1338 responses:
1312 '204': 1339 '204':
1313 $ref: '#/paths/~1users~1me/put/responses/204' 1340 $ref: '#/paths/~1users~1me/put/responses/204'
@@ -1952,7 +1979,7 @@ components:
1952 description: 'Video file size in bytes' 1979 description: 'Video file size in bytes'
1953 torrentUrl: 1980 torrentUrl:
1954 type: string 1981 type: string
1955 torrentDownaloadUrl: 1982 torrentDownloadUrl:
1956 type: string 1983 type: string
1957 fileUrl: 1984 fileUrl:
1958 type: string 1985 type: string