Compare commits

..

5 Commits

Author SHA1 Message Date
899e4f55f4 openapi: add missing 4xx/5xx response bodies for cloud-emitting endpoints (#14063)
Vendor declares shared endpoints (e.g. /api/queue, /api/settings,
/api/assets/*, /api/billing/*) with success responses but is missing
many of the 4xx/5xx error response bodies that Comfy-Org/cloud's
runtime actually emits. Cloud's Go handlers reference the generated
ingest.Op<StatusCode>JSONResponse types for these missing statuses,
which currently fail to resolve when codegen runs against the
vendored spec.

This PR adds 237 response entries across 117 operations, restoring
the documented error responses that cloud emits. Bodies are copied
verbatim from Comfy-Org/cloud's hand-written ingest spec
(services/ingest/openapi.yaml) and reference a new ErrorResponse
schema also added in this PR (matches cloud's {code, message} runtime
shape, tagged x-runtime: [cloud]).

ErrorResponse is intentionally separate from the existing CloudError
schema. CloudError's shape ({error}) describes one runtime; cloud
emits a different shape ({code, message}). Existing CloudError refs
in vendor are untouched; new cloud-emitting error references use
ErrorResponse.

Identified via Comfy-Org/cloud's TestCutoverSafe build-safety gate
(BE-1106). Companion to PR #14060 (operationId renames) and PR #14061
(cloud-only schema additions).
2026-05-22 16:12:23 -07:00
52752612aa fix(openapi): add BindingErrorResponse schema
OAuthRegisterBadRequestResponse references BindingErrorResponse but
that schema wasn't in the original add. Adding it now as a cloud-only
schema matching the cloud runtime's binding-error shape (single
'message' string field).
2026-05-22 16:08:48 -07:00
50289f2607 openapi: add 41 cloud-runtime schemas to components.schemas (cutover prep)
Adds schemas that exist in Comfy-Org/cloud's hand-written ingest spec
but not yet in this vendored OSS spec. All tagged x-runtime: [cloud]
per the field-drift convention and prefixed with [cloud-only] in the
description.

These schemas are referenced by cloud's Go handlers via the generated
ingest.<Schema> Go type names. Codegen from the vendored spec didn't
produce those types because the schemas weren't declared here. Adding
them unblocks the post-cutover combined-spec codegen.

Schemas added (alphabetical):
  AssetDownloadResponse, AssetMetadataResponse, BillingBalanceResponse,
  BillingPlansResponse, BillingStatusResponse, GetUserDataResponseFull,
  HistoryDetailEntry, HistoryDetailResponse, HistoryResponse,
  HubLabelInfo, HubProfileSummary, HubWorkflowListResponse,
  HubWorkflowStatus, HubWorkflowSummary, HubWorkflowTemplateEntry,
  JobStatusResponse, JobsListResponse, LabelRef, LogsResponse, Member,
  OAuthRegisterBadRequestResponse, PendingInvite, Plan, PlanAvailability,
  PlanAvailabilityReason, PlanSeatSummary, PreviewPlanInfo,
  PreviewSubscribeResponse, PublishedWorkflowDetail, SecretResponse,
  SubscriptionDuration, SubscriptionTier, UserDataResponseFull,
  ValidationError, ValidationResult, WorkflowForkedFrom, WorkflowResponse,
  WorkflowVersionContentResponse, WorkspaceAPIKeyInfo, WorkspaceSummary,
  WorkspaceWithRole

Identified via Comfy-Org/cloud's TestCutoverSafe build-safety gate
(BE-1106). Companion to PR #14060 (operationId renames).
2026-05-22 16:08:48 -07:00
a0deb78424 fix(openapi): resolve getHistory operationId collision
Spectral flagged: both /api/history (OSS local) and /api/history_v2
(cloud) had operationId 'getHistory' after the rename. Rename vendor's
/api/history to 'getPromptHistory' to disambiguate. Cloud's runtime
denies /api/history at the overlay level so combined codegen is
unaffected by this change.
2026-05-22 15:48:03 -07:00
96d4c86e4b openapi: rename 55 cloud-side operationIds to match runtime handlers
For the 55 operations below, vendor's operationId did not match the
name cloud's runtime handlers expect. Generated types from vendor
therefore had different names (e.g. CreateSubscription200JSONResponse)
than what cloud handlers reference (Subscribe200JSONResponse), which
blocks the post-cutover combined-spec codegen.

All 55 renames target the cloud-runtime-authoritative name. Several
of these endpoints are shared concepts (queue, settings, userdata,
object_info) that OSS local also serves — the rename aligns vendor
with the longstanding cloud handler-side convention to unblock the
shared codegen. No request/response *shape* changes in this PR; only
operationId labels.

Notable categories:
  - Billing/subscriptions: 7 renames (subscribe, getBillingPlans, ...)
  - Workspace + workflows: 13 renames (createWorkflow, ...)
  - Hub: 3 renames
  - Auth/users: 5 renames
  - Shared OSS surface (settings, queue, view, userdata): 12 renames
  - Misc cloud-only: 15 renames

Identified via Comfy-Org/cloud's TestCutoverSafe build-safety gate
(BE-1106), which compares handler type references against codegen
output from the combined spec.
2026-05-22 15:37:14 -07:00
2 changed files with 59 additions and 404 deletions

View File

@ -458,41 +458,6 @@ jobs:
echo "Released ${NEW_VERSION} on ${RELEASE_BRANCH}."
- name: Delete remote source branch
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
REPO: ${{ github.repository }}
SOURCE_BRANCH: ${{ steps.resolve.outputs.source_branch }}
SOURCE_COMMIT: ${{ inputs.commit }}
RELEASE_BRANCH: ${{ steps.latest.outputs.release_branch }}
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
run: |
set -euo pipefail
# Belt-and-braces: the resolve step already refuses the default branch,
# but never delete the default or the release branch under any
# circumstances.
if [[ "${SOURCE_BRANCH}" == "${DEFAULT_BRANCH}" || "${SOURCE_BRANCH}" == "${RELEASE_BRANCH}" ]]; then
echo "::error::Refusing to delete '${SOURCE_BRANCH}' (matches default or release branch)."
exit 1
fi
# Delete the source branch on origin, but only if its tip is still the
# SHA we released from. If someone pushed new commits to it after we
# resolved it, leave it alone — those commits would be silently lost.
current_tip="$(git ls-remote origin "refs/heads/${SOURCE_BRANCH}" | awk '{print $1}')"
if [[ -z "${current_tip}" ]]; then
echo "Source branch '${SOURCE_BRANCH}' no longer exists on origin; nothing to delete."
exit 0
fi
if [[ "${current_tip}" != "${SOURCE_COMMIT}" ]]; then
echo "::warning::Source branch '${SOURCE_BRANCH}' tip (${current_tip}) no longer matches released commit (${SOURCE_COMMIT}). Leaving it in place."
exit 0
fi
git push origin --delete "refs/heads/${SOURCE_BRANCH}"
echo "Deleted remote branch '${SOURCE_BRANCH}'."
- name: Summary
if: always()
env:

View File

@ -1200,7 +1200,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/GetUserDataResponseFull"
$ref: "#/components/schemas/ListUserdataResponse"
"404":
description: Directory not found
@ -1340,7 +1340,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/UserDataResponseFull"
$ref: "#/components/schemas/UserDataResponse"
"409":
description: File exists and overwrite not set
'400':
@ -1434,7 +1434,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/UserDataResponseFull"
$ref: "#/components/schemas/UserDataResponse"
"404":
description: Source file not found
"409":
@ -2752,7 +2752,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/JobCancelResponse"
$ref: "#/components/schemas/CloudJobStatus"
"401":
description: Unauthorized
content:
@ -2803,7 +2803,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/JobStatusResponse"
$ref: "#/components/schemas/CloudJobStatus"
"401":
description: Unauthorized
content:
@ -2899,7 +2899,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/HistoryResponse"
$ref: "#/components/schemas/HistoryV2Response"
"401":
description: Unauthorized
content:
@ -2938,7 +2938,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/HistoryDetailResponse"
$ref: "#/components/schemas/HistoryV2Entry"
"401":
description: Unauthorized
content:
@ -2994,7 +2994,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/LogsResponse"
$ref: "#/components/schemas/CloudLogsResponse"
"401":
description: Unauthorized
content:
@ -3315,7 +3315,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/AssetMetadataResponse"
$ref: "#/components/schemas/RemoteAssetMetadata"
"400":
description: Bad request
content:
@ -3889,7 +3889,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/HubWorkflowListResponse"
$ref: "#/components/schemas/HubWorkflowList"
'400':
description: Bad request (e.g. malformed pagination cursor)
content:
@ -3972,7 +3972,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/HubWorkflowDetail"
$ref: "#/components/schemas/HubWorkflow"
"404":
description: Not found
content:
@ -4092,7 +4092,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/WorkflowListResponse"
$ref: "#/components/schemas/CloudWorkflowList"
"401":
description: Unauthorized
content:
@ -4136,7 +4136,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/WorkflowResponse"
$ref: "#/components/schemas/CloudWorkflow"
"400":
description: Bad request
content:
@ -4183,7 +4183,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/WorkflowResponse"
$ref: "#/components/schemas/CloudWorkflow"
"401":
description: Unauthorized
content:
@ -4239,7 +4239,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/WorkflowResponse"
$ref: "#/components/schemas/CloudWorkflow"
"400":
description: Bad request
content:
@ -4438,7 +4438,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/WorkflowResponse"
$ref: "#/components/schemas/CloudWorkflow"
"401":
description: Unauthorized
content:
@ -4607,7 +4607,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/PublishedWorkflowDetail"
$ref: "#/components/schemas/CloudWorkflow"
"404":
description: Not found
content:
@ -4743,7 +4743,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ExchangeTokenResponse"
$ref: "#/components/schemas/AuthTokenResponse"
"400":
description: Bad request
content:
@ -5089,7 +5089,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/BillingBalanceResponse"
$ref: "#/components/schemas/BillingBalance"
"401":
description: Unauthorized
content:
@ -5132,7 +5132,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/BillingEventsResponse"
$ref: "#/components/schemas/BillingEventList"
"401":
description: Unauthorized
content:
@ -5166,7 +5166,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/BillingOpStatusResponse"
$ref: "#/components/schemas/BillingOp"
"401":
description: Unauthorized
content:
@ -5278,7 +5278,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/PreviewSubscribeResponse"
$ref: "#/components/schemas/SubscriptionPreview"
"400":
description: Bad request
content:
@ -5311,7 +5311,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/BillingStatusResponse"
$ref: "#/components/schemas/BillingStatus"
"401":
description: Unauthorized
content:
@ -5359,7 +5359,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/SubscribeResponse"
$ref: "#/components/schemas/BillingSubscription"
"400":
description: Bad request
content:
@ -5392,7 +5392,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/CancelSubscriptionResponse"
$ref: "#/components/schemas/BillingSubscription"
"401":
description: Unauthorized
content:
@ -5425,7 +5425,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ResubscribeResponse"
$ref: "#/components/schemas/BillingSubscription"
"401":
description: Unauthorized
content:
@ -5470,7 +5470,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateTopupResponse"
$ref: "#/components/schemas/BillingBalance"
"400":
description: Bad request
content:
@ -5555,7 +5555,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateWorkspaceAPIKeyResponse"
$ref: "#/components/schemas/WorkspaceApiKeyCreated"
"400":
description: Bad request
content:
@ -5704,7 +5704,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/PendingInvite"
$ref: "#/components/schemas/WorkspaceInvite"
"400":
description: Bad request
content:
@ -6315,7 +6315,22 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/FeedbackRequest"
type: object
required:
- message
properties:
message:
type: string
description: Feedback message
rating:
type: integer
minimum: 1
maximum: 5
description: Optional satisfaction rating
context:
type: object
additionalProperties: true
description: Additional context metadata
responses:
"201":
description: Feedback submitted
@ -6471,7 +6486,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/AcceptInviteResponse"
$ref: "#/components/schemas/Workspace"
"400":
description: Bad request
content:
@ -6571,7 +6586,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/SecretResponse"
$ref: "#/components/schemas/SecretMeta"
"400":
description: Bad request
content:
@ -6630,7 +6645,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/SecretResponse"
$ref: "#/components/schemas/SecretMeta"
"401":
description: Unauthorized
content:
@ -6687,7 +6702,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/SecretResponse"
$ref: "#/components/schemas/SecretMeta"
"400":
description: Bad request
content:
@ -6790,7 +6805,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/UserResponse"
$ref: "#/components/schemas/CloudUser"
"401":
description: Unauthorized
content:
@ -7520,12 +7535,6 @@ components:
description: Unique job identifier (same as prompt_id)
status:
type: string
enum:
- pending
- in_progress
- completed
- failed
- cancelled
description: Current job status
create_time:
type: integer
@ -7559,12 +7568,6 @@ components:
format: uuid
status:
type: string
enum:
- pending
- in_progress
- completed
- failed
- cancelled
workflow:
type: object
additionalProperties: true
@ -9585,15 +9588,16 @@ components:
description: List of plan features
BillingStatus:
type: string
type: object
x-runtime: [cloud]
description: "[cloud-only] Overall billing/payment lifecycle status."
enum:
- awaiting_payment_method
- pending_payment
- paid
- payment_failed
- inactive
description: "[cloud-only] Overall billing and subscription status."
properties:
subscription:
$ref: "#/components/schemas/BillingSubscription"
balance:
$ref: "#/components/schemas/BillingBalance"
has_payment_method:
type: boolean
BillingSubscription:
type: object
@ -9655,12 +9659,6 @@ components:
type: string
name:
type: string
type:
type: string
enum:
- personal
- team
description: Workspace type (personal vs. team).
owner_id:
type: string
member_count:
@ -11381,311 +11379,3 @@ components:
message:
type: string
description: Human-readable error message
AcceptInviteResponse:
type: object
x-runtime: [cloud]
description: '[cloud-only] Response returned after successfully accepting a workspace invitation.'
required:
- workspace_id
- workspace_name
properties:
workspace_id:
type: string
description: ID of the workspace joined
workspace_name:
type: string
description: Name of the workspace joined
BillingEventsResponse:
type: object
x-runtime: [cloud]
description: '[cloud-only] Paginated list of billing events for a workspace.'
required:
- total
- events
- page
- limit
- totalPages
properties:
total:
type: integer
description: Total number of events
events:
type: array
items:
$ref: '#/components/schemas/BillingEvent'
page:
type: integer
description: Current page number (1-indexed)
limit:
type: integer
description: Items per page
totalPages:
type: integer
description: Total number of pages
BillingOpStatusResponse:
type: object
x-runtime: [cloud]
description: '[cloud-only] Status of an asynchronous billing operation.'
required:
- id
- status
- started_at
properties:
id:
type: string
description: Unique identifier for the billing operation
status:
type: string
enum:
- pending
- succeeded
- failed
description: Current status of the operation
error_message:
type: string
description: Error message if status is failed
started_at:
type: string
format: date-time
description: When the operation was initiated
completed_at:
type: string
format: date-time
description: When the operation completed (success or failure)
CancelSubscriptionResponse:
type: object
x-runtime: [cloud]
description: '[cloud-only] Response after successfully cancelling a subscription.'
required:
- cancel_at
- billing_op_id
properties:
billing_op_id:
type: string
description: Billing operation ID to poll for status via GET /api/billing/ops/{id}
cancel_at:
type: string
format: date-time
description: The date when the subscription will end (end of current billing period)
CreateTopupResponse:
type: object
x-runtime: [cloud]
description: '[cloud-only] Response after successfully purchasing a credit top-up.'
required:
- topup_id
- status
- amount_cents
- billing_op_id
properties:
billing_op_id:
type: string
description: Billing operation ID to poll for status via GET /api/billing/ops/{id}
topup_id:
type: string
description: Unique identifier for the top-up request (same as billing_op_id, deprecated)
status:
type: string
enum:
- pending
- completed
- failed
description: Current status of the top-up
amount_cents:
type: integer
format: int64
description: Amount being charged in cents
CreateWorkspaceAPIKeyResponse:
type: object
x-runtime: [cloud]
description: '[cloud-only] Response containing the newly created workspace API key.'
required:
- id
- name
- description
- key
- key_prefix
- created_at
properties:
id:
type: string
format: uuid
description: API key ID
name:
type: string
description: User-provided label
description:
type: string
description: User-provided description of the key's purpose. Limit is byte-based (UTF-8 encoding); 5000 bytes equals
5000 ASCII characters or fewer multi-byte characters.
maxLength: 5000
key:
type: string
description: The full plaintext API key (only shown once)
key_prefix:
type: string
description: First 8 chars after prefix for display
expires_at:
type: string
format: date-time
description: When the key expires (if set)
created_at:
type: string
format: date-time
description: When the key was created
ExchangeTokenResponse:
type: object
x-runtime: [cloud]
description: '[cloud-only] Response containing the issued Cloud JWT and its expiry.'
required:
- token
- expires_at
- workspace
- role
- permissions
properties:
token:
type: string
description: Cloud JWT token
expires_at:
type: string
format: date-time
description: Token expiration time (RFC 3339)
workspace:
$ref: '#/components/schemas/WorkspaceSummary'
role:
type: string
enum:
- owner
- member
description: User's role in the workspace
permissions:
type: array
items:
type: string
description: Permission strings for the role
example:
- owner:*
JobCancelResponse:
type: object
x-runtime: [cloud]
description: '[cloud-only] Response for POST /api/jobs/{job_id}/cancel. Returned on both fresh cancels and idempotent no-ops.'
required:
- cancelled
properties:
cancelled:
type: boolean
description: "True when a cancel event was successfully dispatched by this call.\nFalse when the job was already in\
\ a terminal or cancelling state,\nin which case the call is a no-op (still 200 \u2014 idempotent).\n"
ResubscribeResponse:
type: object
x-runtime: [cloud]
description: '[cloud-only] Response after successfully resubscribing to a billing plan.'
required:
- status
- billing_op_id
properties:
billing_op_id:
type: string
description: Billing operation ID to poll for status via GET /api/billing/ops/{id}
status:
type: string
enum:
- active
description: The subscription status after resubscribing
message:
type: string
description: Human-readable confirmation message
SubscribeResponse:
type: object
x-runtime: [cloud]
description: '[cloud-only] Response after successfully subscribing to a billing plan.'
required:
- status
- billing_op_id
properties:
billing_op_id:
type: string
description: Billing operation ID to poll for status via GET /api/billing/ops/{id}
status:
type: string
enum:
- subscribed
- needs_payment_method
- pending_payment
description: 'Status of the subscription operation:
- subscribed: Subscription is active immediately
- needs_payment_method: User must add payment method via payment_method_url
- pending_payment: Upgrade initiated, waiting for payment to complete
'
effective_at:
type: string
format: date-time
description: When the subscription became/becomes active (present when status=subscribed or pending_payment)
payment_method_url:
type: string
description: URL to redirect user to add payment method (present when status=needs_payment_method)
UserResponse:
type: object
x-runtime: [cloud]
description: '[cloud-only] User information response'
required:
- id
- status
properties:
id:
type: string
description: Firebase UID of the authenticated user
status:
type: string
description: User status (always "active" for authenticated users)
WorkflowListResponse:
type: object
x-runtime: [cloud]
description: '[cloud-only] Paginated list of saved workflows.'
required:
- data
- pagination
properties:
data:
type: array
items:
$ref: '#/components/schemas/WorkflowResponse'
pagination:
$ref: '#/components/schemas/PaginationInfo'
FeedbackRequest:
type: object
x-runtime: [cloud]
description: "[cloud-only] User feedback submission body."
required:
- message
properties:
type:
type: string
enum:
- missing_nodes
- general
- missing_models
description: Feedback category
category:
type: string
description: Additional category metadata
message:
type: string
description: User-provided feedback message