From 1d2b7041604dd031190ea1dd0fe1e880217ed9da Mon Sep 17 00:00:00 2001 From: bymyself Date: Mon, 14 Jul 2025 14:35:09 -0700 Subject: [PATCH] [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. --- openapi.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index d62466b8e..0e05037b8 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -251,6 +251,8 @@ paths: multipart/form-data: schema: type: object + required: + - image properties: image: type: string @@ -258,16 +260,21 @@ paths: description: The image file to upload overwrite: type: string - description: Whether to overwrite if file exists (true/false) + enum: + - "true" + - "false" + description: Whether to overwrite if file exists type: type: string enum: - input - temp - output + default: input description: Type of directory to store the image in subfolder: type: string + default: "" description: Subfolder to store the image in responses: '200': @@ -291,6 +298,9 @@ paths: multipart/form-data: schema: type: object + required: + - image + - original_ref properties: image: type: string