mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-30 19:07:25 +08:00
openapi: fix GET /api/hub/labels response to the label-catalog shape
GET /api/hub/labels returns the catalog of available labels you can filter by,
which the Cloud runtime serves as {labels: HubLabelInfo[]} (slug name,
display_name, and a type category: tag/model/custom_node).
The spec had this operation returning a bare array of HubLabel ({id, name,
color}) — that schema models the label chips attached to a published workflow
(HubWorkflow.labels), a different object. The catalog schema (HubLabelInfo)
already existed but was unreferenced.
Repoints the 200 response to a new HubLabelListResponse wrapper over the
existing HubLabelInfo. HubLabel is unchanged and still used by
HubWorkflow.labels. Endpoint remains x-runtime: [cloud].
This commit is contained in:
parent
e9e30553ca
commit
cabccdeb38
18
openapi.yaml
18
openapi.yaml
@ -3578,10 +3578,7 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: array
|
$ref: "#/components/schemas/HubLabelListResponse"
|
||||||
items:
|
|
||||||
$ref: "#/components/schemas/HubLabel"
|
|
||||||
|
|
||||||
'400':
|
'400':
|
||||||
description: Bad request (e.g. invalid type parameter)
|
description: Bad request (e.g. invalid type parameter)
|
||||||
content:
|
content:
|
||||||
@ -10455,6 +10452,19 @@ components:
|
|||||||
- custom_node
|
- custom_node
|
||||||
description: Label category.
|
description: Label category.
|
||||||
|
|
||||||
|
HubLabelListResponse:
|
||||||
|
type: object
|
||||||
|
x-runtime: [cloud]
|
||||||
|
description: '[cloud-only] Response wrapper for the available Hub label catalog.'
|
||||||
|
required:
|
||||||
|
- labels
|
||||||
|
properties:
|
||||||
|
labels:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/HubLabelInfo'
|
||||||
|
description: Available labels, optionally filtered by type.
|
||||||
|
|
||||||
HubProfileSummary:
|
HubProfileSummary:
|
||||||
type: object
|
type: object
|
||||||
x-runtime: [cloud]
|
x-runtime: [cloud]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user