1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

[openapi] Improve queue item structure with proper schema

Replace generic additionalProperties: true for queue items with
detailed QueueItem schema that properly describes the array structure:

- Position number (integer)
- Prompt ID (UUID string)
- Workflow graph (object)
- Extra metadata (object)
- Output node IDs (array)

This provides much better API documentation and validation for
queue responses than the previous generic object definition.
This commit is contained in:
bymyself
2025-07-14 15:53:22 -07:00
parent b5d6064974
commit 5c9b27e6e7

View File

@@ -696,15 +696,11 @@ components:
queue_running:
type: array
items:
type: object
description: Currently running items
additionalProperties: true
$ref: '#/components/schemas/QueueItem'
queue_pending:
type: array
items:
type: object
description: Pending items in the queue
additionalProperties: true
$ref: '#/components/schemas/QueueItem'
HistoryItem:
type: object
properties:
@@ -936,3 +932,23 @@ components:
enabled:
type: boolean
description: Whether to enable or disable subscription
QueueItem:
type: array
description: Queue item containing execution details
items:
oneOf:
- type: integer
description: Queue position number
- type: string
format: uuid
description: Unique prompt identifier
- type: object
description: Workflow graph with nodes and connections
additionalProperties: true
- type: object
description: Extra metadata (auth tokens, client info, etc.)
additionalProperties: true
- type: array
description: Array of output node IDs
items:
type: string