mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-30 10:57:23 +08:00
openapi: promote workflow_templates_source enum to named schema
Cloud uses oapi-codegen to generate Go server code from this spec. With nullable + inline enum, oapi-codegen 3.1 emits a reference to a generated op-scoped type (e.g. `GetFeatures200JSONResponseWorkflowTemplatesSource`) but doesn't emit the type definition itself — the generated code fails to compile. Promoting the enum to a top-level `WorkflowTemplatesSource` component schema (referenced via allOf + $ref) makes oapi-codegen emit the type declaration once at the schema name, and consumers reference it cleanly. No behavioral change — same enum values, same nullability.
This commit is contained in:
parent
6c543faf86
commit
69f9848c39
12
openapi.yaml
12
openapi.yaml
@ -887,9 +887,9 @@ paths:
|
||||
x-runtime: [cloud]
|
||||
description: "[cloud-only] Version identifier for the workflow templates bundle. Local ComfyUI returns null."
|
||||
workflow_templates_source:
|
||||
type: string
|
||||
nullable: true
|
||||
enum: [dynamic_config_override, workflow_templates_version_json]
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/WorkflowTemplatesSource"
|
||||
x-runtime: [cloud]
|
||||
description: "[cloud-only] How the templates version was resolved. Local ComfyUI returns null."
|
||||
|
||||
@ -11918,3 +11918,11 @@ components:
|
||||
x-runtime:
|
||||
- cloud
|
||||
description: "[cloud-only] Numeric rating (e.g. 1-5 stars) associated with the feedback."
|
||||
|
||||
WorkflowTemplatesSource:
|
||||
type: string
|
||||
x-runtime: [cloud]
|
||||
enum:
|
||||
- dynamic_config_override
|
||||
- workflow_templates_version_json
|
||||
description: "[cloud-only] How the workflow templates version was resolved (config override vs. bundled JSON)."
|
||||
|
||||
Loading…
Reference in New Issue
Block a user