]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
fix response in openapi spec for quota and video ratings
authorRigel Kent <sendmemail@rigelk.eu>
Mon, 10 May 2021 08:26:50 +0000 (10:26 +0200)
committerRigel Kent <sendmemail@rigelk.eu>
Mon, 10 May 2021 09:27:35 +0000 (11:27 +0200)
closes #4064
closes #4065

support/doc/api/openapi.yaml

index 050ab82f806a476e5ce870cbe7d9dbaba43b079b..a71b571b87ea1cea8032e0903c5f93240ad5ef37 100644 (file)
@@ -50,8 +50,7 @@ info:
 
     # Rate limits
 
-    We are rate-limiting all endpoints of PeerTube's API. Custom values can be configured
-    by administrators:
+    We are rate-limiting all endpoints of PeerTube's API. Custom values can be set by administrators:
 
     | Endpoint                | Calls            | Time frame                |
     |-------------------------|------------------|---------------------------|
@@ -723,7 +722,14 @@ paths:
           content:
             application/json:
               schema:
-                type: number
+                type: object
+                properties:
+                  videoQuotaUsed:
+                    type: number
+                    example: 16810141515
+                  videoQuotaUsedDaily:
+                    type: number
+                    example: 1681014151
   '/users/me/videos/{videoId}/rating':
     get:
       summary: Get rate of my user for a video
@@ -5718,7 +5724,11 @@ components:
           type: string
           description: Id of the video
         rating:
-          type: number
+          type: string
+          enum:
+            - like
+            - dislike
+            - none
           description: Rating of the video
       required:
         - id
@@ -5728,8 +5738,12 @@ components:
         video:
           $ref: '#/components/schemas/Video'
         rating:
-          type: number
-          description: 'Rating of the video'
+          type: string
+          enum:
+            - like
+            - dislike
+            - none
+          description: Rating of the video
       required:
         - video
         - rating