mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-08-02 19:26:43 +00:00
[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:
parent
7baed85b1d
commit
1d2b704160
12
openapi.yaml
12
openapi.yaml
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user