Skip to content

openapi: document QueueManageResponse body on POST /api/queue#14117

Merged
mattmillerai merged 2 commits into
masterfrom
matt/api-queue-manage-response
May 26, 2026
Merged

openapi: document QueueManageResponse body on POST /api/queue#14117
mattmillerai merged 2 commits into
masterfrom
matt/api-queue-manage-response

Conversation

@mattmillerai

Copy link
Copy Markdown
Contributor

Summary

POST /api/queue declares a bare 200 with no response schema, so generated API clients have no type for what the endpoint returns.

The Cloud runtime returns a JSON body describing the mutation result (which prompt IDs were deleted, and whether the queue was cleared). This documents that shape:

  • Adds a QueueManageResponse schema — { deleted: string[], cleared: boolean }
  • References it from the 200 response

Runtime tagging

Tagged x-runtime: [cloud] with a [cloud-only] description. Local ComfyUI's post_queue handler returns web.Response(status=200) with no body, so both fields are nullable — local returns an empty body, Cloud populates it.

No behavior change; spec-only.

@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@mattmillerai, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 15 minutes and 33 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6c2f72cd-c24f-463b-9811-dbceefbdd210

📥 Commits

Reviewing files that changed from the base of the PR and between e9e3055 and 79a4d37.

📒 Files selected for processing (1)
  • openapi.yaml
📝 Walkthrough

Walkthrough

This PR introduces a new QueueManageResponse schema in the OpenAPI specification and updates the POST /api/queue endpoint's 200 response to use it. The schema documents the shape of queue mutation responses with nullable deleted (array of prompt IDs) and cleared (boolean) fields. This change defines the contract for cloud runtime semantics around queue operations while accommodating cases where local behavior may return empty responses.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: documenting the QueueManageResponse schema in the OpenAPI spec for the POST /api/queue endpoint.
Description check ✅ Passed The description is well-detailed and directly related to the changeset, explaining the motivation, implementation details, and the distinction between Cloud and local runtime behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@openapi.yaml`:
- Around line 278-281: The OpenAPI operation paths./api/queue.post.responses.200
currently declares application/json with $ref to QueueManageResponse but the
local /queue handler may return an empty 200 body; update the spec to model the
empty-body case explicitly by either changing the success response to return 204
No Content for empty responses or making the 200 response schema optional/absent
(remove the application/json content) and add a separate 204 response entry, or
ensure the server always returns valid JSON matching QueueManageResponse; locate
the operation for /api/queue POST and modify responses.200 (and/or add
responses.204) and adjust or remove the application/json -> $ref:
"`#/components/schemas/QueueManageResponse`" accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 15c68ece-9e3e-476b-8db5-4775c42d7abe

📥 Commits

Reviewing files that changed from the base of the PR and between f9f54ca and ac7d299.

📒 Files selected for processing (1)
  • openapi.yaml
Comment thread openapi.yaml
The Cloud runtime returns a JSON body from POST /api/queue describing which
prompts were deleted and whether the queue was cleared. The spec previously
declared a bare 200 with no schema, so generated clients had no type for the
response.

Adds a QueueManageResponse schema ({deleted, cleared}) and references it from
the 200 response. Tagged x-runtime: [cloud] with a [cloud-only] description:
local ComfyUI returns an empty 200 body, so both fields are nullable.
…14118)

* 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].

* openapi: add Cloud-runtime fields (workflow_id, execution_error) to JobEntry (#14119)

* openapi: add Cloud-runtime fields workflow_id, execution_error to JobEntry

The Cloud runtime returns two additional fields on JobEntry that the spec
didn't declare:

- workflow_id: UUID of the Cloud workflow entity the job is associated with
- execution_error: structured ComfyUI execution error for failed jobs
  (reuses the existing ExecutionError schema)

Both tagged x-runtime: [cloud] with [cloud-only] descriptions; local ComfyUI
does not populate them.

* openapi: document Cloud-runtime request fields on POST /api/assets/export (#14120)

The Cloud runtime accepts three request fields on /api/assets/export that the
spec didn't declare:

- job_ids: include all assets associated with the given jobs
- naming_strategy: how to name files in the ZIP (enum, default group_by_job_time)
- job_asset_name_filters: optional per-job asset-name allowlist

Also drops asset_ids from required: the runtime supports exporting by job_ids
alone, so neither field is individually required.

/api/assets/export is already x-runtime: [cloud]; these are plain field
additions under that endpoint-level tag.
@mattmillerai mattmillerai merged commit 9217757 into master May 26, 2026
17 checks passed
@mattmillerai mattmillerai deleted the matt/api-queue-manage-response branch May 26, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants