From 69f9848c3980163b6e5ef334ee2eaaa6f582a061 Mon Sep 17 00:00:00 2001 From: Matt Miller Date: Wed, 27 May 2026 00:39:43 -0700 Subject: [PATCH] openapi: promote workflow_templates_source enum to named schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- openapi.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 023b6c55a..532632337 100644 --- a/openapi.yaml +++ b/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)."