Simplify media repo definitions according to OpenAPI 3.1

The schema is not necessary for binary data.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille 2023-06-19 15:44:12 +02:00
parent 9768d04c3d
commit be04ab6b58
No known key found for this signature in database
GPG key ID: 29A48C1F03620416

View file

@ -39,10 +39,7 @@ paths:
requestBody: requestBody:
content: content:
application/octet-stream: application/octet-stream:
schema: example: <bytes>
type: string
example: <bytes>
format: byte
description: The content to be uploaded. description: The content to be uploaded.
required: true required: true
responses: responses:
@ -142,10 +139,7 @@ paths:
requestBody: requestBody:
content: content:
application/octet-stream: application/octet-stream:
schema: example: <bytes>
type: string
example: <bytes>
format: byte
description: The content to be uploaded. description: The content to be uploaded.
required: true required: true
responses: responses:
@ -361,10 +355,8 @@ paths:
content: content:
application/octet-stream: application/octet-stream:
schema: schema:
type: string
# This is a workaround for us not being able to say the response is required. # This is a workaround for us not being able to say the response is required.
description: "**Required.** The bytes for the uploaded file." description: "**Required.** The bytes for the uploaded file."
format: binary
"307": "307":
description: A redirect to the thumbnail of the requested content. description: A redirect to the thumbnail of the requested content.
headers: headers:
@ -500,10 +492,8 @@ paths:
content: content:
application/octet-stream: application/octet-stream:
schema: schema:
type: string
# This is a workaround for us not being able to say the response is required. # This is a workaround for us not being able to say the response is required.
description: "**Required.** The bytes for the uploaded file." description: "**Required.** The bytes for the uploaded file."
format: binary
"307": "307":
description: A redirect to the thumbnail of the requested content. description: A redirect to the thumbnail of the requested content.
headers: headers:
@ -657,15 +647,11 @@ paths:
content: content:
image/jpeg: image/jpeg:
schema: schema:
type: string
# This is a workaround for us not being able to say the response is required. # This is a workaround for us not being able to say the response is required.
description: "**Required.** The bytes for the thumbnail." description: "**Required.** The bytes for the thumbnail."
format: binary
image/png: image/png:
schema: schema:
type: string
description: "**Required.** The bytes for the thumbnail." description: "**Required.** The bytes for the thumbnail."
format: binary
"307": "307":
description: A redirect to the thumbnail of the requested content. description: A redirect to the thumbnail of the requested content.
headers: headers: