37 lines
No EOL
1.1 KiB
YAML
37 lines
No EOL
1.1 KiB
YAML
post:
|
|
summary: Upload an image (PNG, JPEG, or WebP)
|
|
description: |
|
|
Uploads a single image file. Supported formats: **PNG**, **JPEG/JPG**, **WebP**.
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
multipart/form-data:
|
|
schema:
|
|
image:
|
|
type: string
|
|
format: binary
|
|
description: Image file (PNG, JPEG, or WebP)
|
|
encoding:
|
|
image:
|
|
contentType: image/png, image/jpeg, image/webp
|
|
|
|
responses:
|
|
'200':
|
|
description: Image uploaded successfully
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "../schemas/Image.yaml"
|
|
'400':
|
|
description: Bad request — e.g., invalid/malformed image, empty file
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: string
|
|
'415':
|
|
description: |
|
|
Unsupported Media Type — e.g., request `Content-Type` is not `multipart/form-data`,
|
|
or the `image` part has an unsupported `Content-Type` (not image/png, image/jpeg, or image/webp)
|
|
|
|
'500':
|
|
description: Internal server error |