Skip to content

Commit 4e82343

Browse files
authored
Add cloud-runtime experiment node-schema endpoints to spec (Comfy-Org#13806)
* Add cloud-runtime experiment node-schema endpoints to spec Replace the GET operations at /api/experiment/nodes and /api/experiment/nodes/{id} with getNodeInfoSchema and getNodeByID — the optimized, ETag-tagged object_info schema endpoints the cloud frontend depends on for the workflow editor. Each operation is tagged x-runtime: [cloud] and uses the runtime-only tag for cloud-side codegen exclusion. Response headers document the ETag and Cache-Control validators; 304 Not Modified is declared for RFC 7232 conditional GETs. Remove the now-unused CloudNodeList schema to keep Spectral clean. Co-authored-by: Matt Miller <MillerMedia@users.noreply.github.com> * spec: document If-None-Match header on conditional GET endpoints Both `getNodeInfoSchema` and `getNodeByID` advertise `ETag` response headers and a `304 Not Modified` response, but the spec didn't declare the `If-None-Match` request header that triggers conditional validation. Adding it as an optional header parameter on both ops so client codegen exposes the conditional-GET pattern.
1 parent 66669b2 commit 4e82343

1 file changed

Lines changed: 49 additions & 53 deletions

File tree

openapi.yaml

Lines changed: 49 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ tags:
7474
description: Cloud workflow management and versioning (cloud-only)
7575
- name: task
7676
description: Background task management (cloud-only)
77+
- name: runtime-only
78+
description: Operations served exclusively by the cloud runtime with no local equivalent
7779

7880
paths:
7981
# ---------------------------------------------------------------------------
@@ -2573,35 +2575,38 @@ paths:
25732575
# ---------------------------------------------------------------------------
25742576
/api/experiment/nodes:
25752577
get:
2576-
operationId: listCloudNodes
2577-
tags: [node]
2578-
summary: List installed custom nodes
2579-
description: "[cloud-only] Returns the list of custom node packages installed in the cloud runtime."
2578+
operationId: getNodeInfoSchema
2579+
tags: [runtime-only]
2580+
summary: Get pre-rendered node info schema
2581+
description: "[cloud-only] Returns the static ComfyUI object_info schema, identical for every caller, rendered once at startup with empty model/user-file context. Served by a raw HTTP handler that writes pre-rendered bytes with ETag + Cache-Control validators for RFC 7232 conditional GETs."
25802582
x-runtime: [cloud]
25812583
parameters:
2582-
- name: limit
2583-
in: query
2584-
schema:
2585-
type: integer
2586-
description: Maximum number of results
2587-
- name: offset
2588-
in: query
2584+
- name: If-None-Match
2585+
in: header
2586+
required: false
25892587
schema:
2590-
type: integer
2591-
description: Pagination offset
2588+
type: string
2589+
description: Entity tag previously returned by this endpoint. When present and matching, the server returns 304 Not Modified.
25922590
responses:
25932591
"200":
2594-
description: Custom node list
2595-
content:
2596-
application/json:
2592+
description: Node info schema
2593+
headers:
2594+
ETag:
25972595
schema:
2598-
$ref: "#/components/schemas/CloudNodeList"
2599-
"401":
2600-
description: Unauthorized
2596+
type: string
2597+
description: Entity tag for conditional request validation
2598+
Cache-Control:
2599+
schema:
2600+
type: string
2601+
description: Cache directives for the response
26012602
content:
26022603
application/json:
26032604
schema:
2604-
$ref: "#/components/schemas/CloudError"
2605+
type: object
2606+
additionalProperties:
2607+
$ref: "#/components/schemas/NodeInfo"
2608+
"304":
2609+
description: Not Modified — returned when the client sends a matching If-None-Match header
26052610
post:
26062611
operationId: installCloudNode
26072612
tags: [node]
@@ -2651,37 +2656,44 @@ paths:
26512656

26522657
/api/experiment/nodes/{id}:
26532658
get:
2654-
operationId: getCloudNode
2655-
tags: [node]
2656-
summary: Get details of an installed custom node
2657-
description: "[cloud-only] Returns details about a specific installed custom node package."
2659+
operationId: getNodeByID
2660+
tags: [runtime-only]
2661+
summary: Get a single node definition by ID
2662+
description: "[cloud-only] Returns one node's definition from the pre-indexed object_info schema. Served by a raw HTTP handler that writes pre-rendered bytes with ETag + Cache-Control validators for RFC 7232 conditional GETs."
26582663
x-runtime: [cloud]
26592664
parameters:
26602665
- name: id
26612666
in: path
26622667
required: true
26632668
schema:
26642669
type: string
2665-
description: Custom node package ID
2670+
description: Node class identifier
2671+
- name: If-None-Match
2672+
in: header
2673+
required: false
2674+
schema:
2675+
type: string
2676+
description: Entity tag previously returned by this endpoint. When present and matching, the server returns 304 Not Modified.
26662677
responses:
26672678
"200":
2668-
description: Node detail
2669-
content:
2670-
application/json:
2679+
description: Single node definition
2680+
headers:
2681+
ETag:
26712682
schema:
2672-
$ref: "#/components/schemas/CloudNode"
2673-
"401":
2674-
description: Unauthorized
2675-
content:
2676-
application/json:
2683+
type: string
2684+
description: Entity tag for conditional request validation
2685+
Cache-Control:
26772686
schema:
2678-
$ref: "#/components/schemas/CloudError"
2679-
"404":
2680-
description: Not found
2687+
type: string
2688+
description: Cache directives for the response
26812689
content:
26822690
application/json:
26832691
schema:
2684-
$ref: "#/components/schemas/CloudError"
2692+
$ref: "#/components/schemas/NodeInfo"
2693+
"304":
2694+
description: Not Modified — returned when the client sends a matching If-None-Match header
2695+
"404":
2696+
description: Node not found
26852697
delete:
26862698
operationId: uninstallCloudNode
26872699
tags: [node]
@@ -7100,22 +7112,6 @@ components:
71007112
enabled:
71017113
type: boolean
71027114

7103-
CloudNodeList:
7104-
type: object
7105-
x-runtime: [cloud]
7106-
description: "[cloud-only] Paginated list of installed custom node packages."
7107-
required:
7108-
- nodes
7109-
properties:
7110-
nodes:
7111-
type: array
7112-
items:
7113-
$ref: "#/components/schemas/CloudNode"
7114-
total:
7115-
type: integer
7116-
has_more:
7117-
type: boolean
7118-
71197115
HubLabel:
71207116
type: object
71217117
x-runtime: [cloud]

0 commit comments

Comments
 (0)