Fix method drift on cloud-runtime endpoints

Three PUT operations were added that should be PATCH (cloud serves
PATCH for partial updates):

- /api/workflows/{workflow_id}
- /api/workspaces/{id}
- /api/workspace/members/{userId}

Two POST operations were added that should be GET (cloud serves GET
with query params):

- /api/assets/remote-metadata (url moves to query param)
- /api/files/mask-layers (response shape replaced — operation queries
  related mask layer filenames, not file uploads)
This commit is contained in:
Matt Miller 2026-05-06 14:00:34 -07:00
parent 0a7539d5a3
commit 6b1bfe046f

View File

@ -2602,25 +2602,20 @@ paths:
$ref: "#/components/schemas/CloudError" $ref: "#/components/schemas/CloudError"
/api/assets/remote-metadata: /api/assets/remote-metadata:
post: get:
operationId: getAssetRemoteMetadata operationId: getAssetRemoteMetadata
tags: [assets] tags: [assets]
summary: Fetch metadata for a remote asset URL summary: Fetch metadata for a remote asset URL
description: "[cloud-only] Fetches and returns metadata (content type, size, filename) for a remote URL without downloading the full content." description: "[cloud-only] Fetches and returns metadata (content type, size, filename) for a remote URL without downloading the full content."
x-runtime: [cloud] x-runtime: [cloud]
requestBody: parameters:
required: true - name: url
content: in: query
application/json: required: true
schema: schema:
type: object type: string
required: format: uri
- url description: URL to inspect
properties:
url:
type: string
format: uri
description: URL to inspect
responses: responses:
"200": "200":
description: Remote metadata description: Remote metadata
@ -3246,7 +3241,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/CloudError" $ref: "#/components/schemas/CloudError"
put: patch:
operationId: updateCloudWorkflow operationId: updateCloudWorkflow
tags: [workflows] tags: [workflows]
summary: Update a cloud workflow summary: Update a cloud workflow
@ -4277,7 +4272,7 @@ paths:
$ref: "#/components/schemas/CloudError" $ref: "#/components/schemas/CloudError"
/api/workspace/members/{userId}: /api/workspace/members/{userId}:
put: patch:
operationId: updateWorkspaceMember operationId: updateWorkspaceMember
tags: [workspace] tags: [workspace]
summary: Update a workspace member's role summary: Update a workspace member's role
@ -4468,7 +4463,7 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/CloudError" $ref: "#/components/schemas/CloudError"
put: patch:
operationId: updateWorkspace operationId: updateWorkspace
tags: [workspace] tags: [workspace]
summary: Update workspace settings summary: Update workspace settings
@ -4580,48 +4575,51 @@ paths:
$ref: "#/components/schemas/CloudError" $ref: "#/components/schemas/CloudError"
/api/files/mask-layers: /api/files/mask-layers:
post: get:
operationId: uploadMaskLayers operationId: getMaskLayers
tags: [upload] tags: [assets]
summary: Upload mask layer files summary: Get related mask layer filenames
description: "[cloud-only] Uploads mask layer image files for use in inpainting and compositing workflows." description: "[cloud-only] Given a mask file (any of the 4 layers), returns all related mask layer filenames. Used by the mask editor to load the paint, mask, and painted layers when reopening a previously edited mask."
x-runtime: [cloud] x-runtime: [cloud]
requestBody: parameters:
required: true - name: filename
content: in: query
multipart/form-data: required: true
schema: schema:
type: object type: string
required: description: Hash filename of any mask layer file
- files
properties:
files:
type: array
items:
type: string
format: binary
description: Mask layer image files
prompt_id:
type: string
format: uuid
description: Associated prompt ID
responses: responses:
"200": "200":
description: Files uploaded description: Related mask layers
content: content:
application/json: application/json:
schema: schema:
type: array type: object
items: properties:
$ref: "#/components/schemas/UploadResult" mask:
"400": type: string
description: Bad request description: Filename of the mask layer
nullable: true
paint:
type: string
description: Filename of the paint strokes layer
nullable: true
painted:
type: string
description: Filename of the painted image layer
nullable: true
painted_masked:
type: string
description: Filename of the final composite layer
nullable: true
"401":
description: Unauthorized
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/CloudError" $ref: "#/components/schemas/CloudError"
"401": "404":
description: Unauthorized description: File not found or not a mask file
content: content:
application/json: application/json:
schema: schema: