[openapi] Improve upload endpoint request schemas

Enhance multipart/form-data schemas for image upload endpoints:

- Add required field constraints for image uploads
- Specify enum values for overwrite parameter ("true"/"false")
- Add default values for type ("input") and subfolder ("")
- Mark image and original_ref as required fields for mask uploads
- Improve field descriptions and validation

These changes make the API specification more precise and match
the actual server implementation requirements.
This commit is contained in:
bymyself 2025-07-14 14:35:09 -07:00
parent 7baed85b1d
commit 1d2b704160

View File

@ -251,6 +251,8 @@ paths:
multipart/form-data: multipart/form-data:
schema: schema:
type: object type: object
required:
- image
properties: properties:
image: image:
type: string type: string
@ -258,16 +260,21 @@ paths:
description: The image file to upload description: The image file to upload
overwrite: overwrite:
type: string type: string
description: Whether to overwrite if file exists (true/false) enum:
- "true"
- "false"
description: Whether to overwrite if file exists
type: type:
type: string type: string
enum: enum:
- input - input
- temp - temp
- output - output
default: input
description: Type of directory to store the image in description: Type of directory to store the image in
subfolder: subfolder:
type: string type: string
default: ""
description: Subfolder to store the image in description: Subfolder to store the image in
responses: responses:
'200': '200':
@ -291,6 +298,9 @@ paths:
multipart/form-data: multipart/form-data:
schema: schema:
type: object type: object
required:
- image
- original_ref
properties: properties:
image: image:
type: string type: string