mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-10 09:12:31 +08:00
fix(spec): consolidate duplicate path entries on deprecated cloud-runtime endpoints
Previous commit added new path entries with `deprecated: true` for
`/api/job/{job_id}/status`, `/api/history_v2`, `/api/history_v2/{prompt_id}`,
`/api/logs`, and `/api/viewvideo`, but the canonical entries already existed
elsewhere in the file. Result: 5 duplicate path keys (Spectral parser errors),
and the deprecation flag did not land on the operations that FE clients
consume by operationId.
This commit moves `deprecated: true` plus the standardized "Deprecated."
description onto the canonical operations (`getCloudJobStatus`, `getHistoryV2`,
`getHistoryV2ByPromptId`, `getCloudLogs`, `viewVideo`) and removes the
duplicate entries. Operation IDs and response schemas are unchanged.
Spectral lint passes with zero new warnings.
This commit is contained in:
parent
fd17b95e1c
commit
81af8e4de2
224
openapi.yaml
224
openapi.yaml
@ -349,35 +349,6 @@ paths:
|
|||||||
"404":
|
"404":
|
||||||
description: Job not found
|
description: Job not found
|
||||||
|
|
||||||
/api/job/{job_id}/status:
|
|
||||||
get:
|
|
||||||
operationId: getJobStatus
|
|
||||||
tags: [queue]
|
|
||||||
summary: Get job status (legacy singular path)
|
|
||||||
x-runtime: [cloud]
|
|
||||||
deprecated: true
|
|
||||||
description: |
|
|
||||||
**Deprecated.** This endpoint is superseded by `GET /api/jobs/{job_id}`.
|
|
||||||
Clients should migrate; the endpoint is retained for backward
|
|
||||||
compatibility but will be removed in a future release.
|
|
||||||
parameters:
|
|
||||||
- name: job_id
|
|
||||||
in: path
|
|
||||||
description: The job ID to fetch status for.
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: Job status
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: "#/components/schemas/JobDetailResponse"
|
|
||||||
"404":
|
|
||||||
description: Job not found
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# History
|
# History
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
@ -465,75 +436,6 @@ paths:
|
|||||||
additionalProperties:
|
additionalProperties:
|
||||||
$ref: "#/components/schemas/HistoryEntry"
|
$ref: "#/components/schemas/HistoryEntry"
|
||||||
|
|
||||||
/api/history_v2:
|
|
||||||
get:
|
|
||||||
operationId: getHistoryV2
|
|
||||||
tags: [history]
|
|
||||||
summary: Get execution history (v2 format)
|
|
||||||
x-runtime: [cloud]
|
|
||||||
deprecated: true
|
|
||||||
description: |
|
|
||||||
**Deprecated.** This endpoint is superseded by `GET /api/jobs`.
|
|
||||||
Clients should migrate; the endpoint is retained for backward
|
|
||||||
compatibility but will be removed in a future release.
|
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/ComfyUserHeader"
|
|
||||||
- name: limit
|
|
||||||
in: query
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
description: Maximum number of history entries to return
|
|
||||||
- name: offset
|
|
||||||
in: query
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
default: 0
|
|
||||||
description: Pagination offset
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: History entries
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
items:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
$ref: "#/components/schemas/HistoryEntry"
|
|
||||||
pagination:
|
|
||||||
$ref: "#/components/schemas/PaginationInfo"
|
|
||||||
|
|
||||||
/api/history_v2/{prompt_id}:
|
|
||||||
get:
|
|
||||||
operationId: getHistoryV2ByPromptId
|
|
||||||
tags: [history]
|
|
||||||
summary: Get v2 history for a specific prompt
|
|
||||||
x-runtime: [cloud]
|
|
||||||
deprecated: true
|
|
||||||
description: |
|
|
||||||
**Deprecated.** This endpoint is superseded by `GET /api/jobs/{prompt_id}`.
|
|
||||||
Clients should migrate; the endpoint is retained for backward
|
|
||||||
compatibility but will be removed in a future release.
|
|
||||||
parameters:
|
|
||||||
- $ref: "#/components/parameters/ComfyUserHeader"
|
|
||||||
- name: prompt_id
|
|
||||||
in: path
|
|
||||||
description: The prompt ID to fetch history for.
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: uuid
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: Single history entry
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
$ref: "#/components/schemas/HistoryEntry"
|
|
||||||
"404":
|
|
||||||
description: Prompt not found
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Upload
|
# Upload
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
@ -690,71 +592,6 @@ paths:
|
|||||||
"404":
|
"404":
|
||||||
description: File not found
|
description: File not found
|
||||||
|
|
||||||
/api/viewvideo:
|
|
||||||
get:
|
|
||||||
operationId: viewVideo
|
|
||||||
tags: [view]
|
|
||||||
summary: View or download a video file (legacy alias)
|
|
||||||
x-runtime: [cloud]
|
|
||||||
deprecated: true
|
|
||||||
description: |
|
|
||||||
**Deprecated.** This endpoint is an alias of `GET /api/view` added for
|
|
||||||
legacy history-queue video playback. Callers should use `/api/view`
|
|
||||||
directly; the endpoint is retained for backward compatibility but will
|
|
||||||
be removed in a future release.
|
|
||||||
parameters:
|
|
||||||
- name: filename
|
|
||||||
in: query
|
|
||||||
required: true
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
description: Name of the file to view
|
|
||||||
- name: type
|
|
||||||
in: query
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
enum: [input, output, temp]
|
|
||||||
default: output
|
|
||||||
description: Directory type
|
|
||||||
- name: subfolder
|
|
||||||
in: query
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
description: Subfolder within the directory
|
|
||||||
- name: preview
|
|
||||||
in: query
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
description: Preview format hint (e.g. "webp;90")
|
|
||||||
- name: channel
|
|
||||||
in: query
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
enum: [rgba, rgb, a]
|
|
||||||
description: Channel extraction mode
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: File content
|
|
||||||
content:
|
|
||||||
image/*:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: binary
|
|
||||||
video/*:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: binary
|
|
||||||
audio/*:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: binary
|
|
||||||
application/octet-stream:
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
format: binary
|
|
||||||
"404":
|
|
||||||
description: File not found
|
|
||||||
|
|
||||||
/api/view_metadata/{folder_name}:
|
/api/view_metadata/{folder_name}:
|
||||||
get:
|
get:
|
||||||
operationId: viewMetadata
|
operationId: viewMetadata
|
||||||
@ -855,32 +692,6 @@ paths:
|
|||||||
x-runtime: [cloud]
|
x-runtime: [cloud]
|
||||||
description: "[cloud-only] How the templates version was resolved. Local ComfyUI returns null."
|
description: "[cloud-only] How the templates version was resolved. Local ComfyUI returns null."
|
||||||
|
|
||||||
/api/logs:
|
|
||||||
get:
|
|
||||||
operationId: getLogs
|
|
||||||
tags: [system]
|
|
||||||
summary: Get server logs (placeholder)
|
|
||||||
x-runtime: [cloud]
|
|
||||||
deprecated: true
|
|
||||||
description: |
|
|
||||||
**Deprecated.** This endpoint returns a static placeholder response and
|
|
||||||
provides no real log data. It is retained only to avoid breaking clients
|
|
||||||
that still call it. Clients should remove their dependency; the endpoint
|
|
||||||
will be removed in a future release.
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: Static placeholder log response
|
|
||||||
content:
|
|
||||||
application/json:
|
|
||||||
schema:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
logs:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
description: Log lines (always empty in current implementation)
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Node / Object Info
|
# Node / Object Info
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
@ -2258,7 +2069,6 @@ paths:
|
|||||||
type: integer
|
type: integer
|
||||||
description: Number of assets marked as missing
|
description: Number of assets marked as missing
|
||||||
|
|
||||||
|
|
||||||
# ===========================================================================
|
# ===========================================================================
|
||||||
# Cloud-runtime FE-facing operations
|
# Cloud-runtime FE-facing operations
|
||||||
#
|
#
|
||||||
@ -2309,7 +2119,11 @@ paths:
|
|||||||
operationId: getCloudJobStatus
|
operationId: getCloudJobStatus
|
||||||
tags: [queue]
|
tags: [queue]
|
||||||
summary: Get status of a cloud job
|
summary: Get status of a cloud job
|
||||||
description: "[cloud-only] Returns the current execution status of a cloud job."
|
deprecated: true
|
||||||
|
description: |
|
||||||
|
**Deprecated.** This endpoint is superseded by `GET /api/jobs/{job_id}`.
|
||||||
|
Clients should migrate; the endpoint is retained for backward
|
||||||
|
compatibility but will be removed in a future release.
|
||||||
x-runtime: [cloud]
|
x-runtime: [cloud]
|
||||||
parameters:
|
parameters:
|
||||||
- name: job_id
|
- name: job_id
|
||||||
@ -2379,7 +2193,11 @@ paths:
|
|||||||
operationId: getHistoryV2
|
operationId: getHistoryV2
|
||||||
tags: [history]
|
tags: [history]
|
||||||
summary: Get paginated execution history (v2)
|
summary: Get paginated execution history (v2)
|
||||||
description: "[cloud-only] Returns a paginated list of execution history entries in the v2 format, with richer metadata than the legacy history endpoint."
|
deprecated: true
|
||||||
|
description: |
|
||||||
|
**Deprecated.** This endpoint is superseded by `GET /api/jobs`.
|
||||||
|
Clients should migrate; the endpoint is retained for backward
|
||||||
|
compatibility but will be removed in a future release.
|
||||||
x-runtime: [cloud]
|
x-runtime: [cloud]
|
||||||
parameters:
|
parameters:
|
||||||
- name: limit
|
- name: limit
|
||||||
@ -2418,7 +2236,11 @@ paths:
|
|||||||
operationId: getHistoryV2ByPromptId
|
operationId: getHistoryV2ByPromptId
|
||||||
tags: [history]
|
tags: [history]
|
||||||
summary: Get v2 history for a specific prompt
|
summary: Get v2 history for a specific prompt
|
||||||
description: "[cloud-only] Returns the v2 history entry for a specific prompt execution."
|
deprecated: true
|
||||||
|
description: |
|
||||||
|
**Deprecated.** This endpoint is superseded by `GET /api/jobs/{prompt_id}`.
|
||||||
|
Clients should migrate; the endpoint is retained for backward
|
||||||
|
compatibility but will be removed in a future release.
|
||||||
x-runtime: [cloud]
|
x-runtime: [cloud]
|
||||||
parameters:
|
parameters:
|
||||||
- name: prompt_id
|
- name: prompt_id
|
||||||
@ -2453,7 +2275,12 @@ paths:
|
|||||||
operationId: getCloudLogs
|
operationId: getCloudLogs
|
||||||
tags: [system]
|
tags: [system]
|
||||||
summary: Get cloud execution logs
|
summary: Get cloud execution logs
|
||||||
description: "[cloud-only] Returns execution logs for the authenticated user's cloud jobs."
|
deprecated: true
|
||||||
|
description: |
|
||||||
|
**Deprecated.** This endpoint returns a static placeholder response and
|
||||||
|
provides no real log data. It is retained only to avoid breaking clients
|
||||||
|
that still call it. Clients should remove their dependency; the endpoint
|
||||||
|
will be removed in a future release.
|
||||||
x-runtime: [cloud]
|
x-runtime: [cloud]
|
||||||
parameters:
|
parameters:
|
||||||
- name: job_id
|
- name: job_id
|
||||||
@ -5547,7 +5374,12 @@ paths:
|
|||||||
operationId: viewVideo
|
operationId: viewVideo
|
||||||
tags: [view]
|
tags: [view]
|
||||||
summary: View or download a video file
|
summary: View or download a video file
|
||||||
description: "[cloud-only] Serves a video file from the output directory. Used by the frontend video player."
|
deprecated: true
|
||||||
|
description: |
|
||||||
|
**Deprecated.** This endpoint is an alias of `GET /api/view` added for
|
||||||
|
legacy history-queue video playback. Callers should use `/api/view`
|
||||||
|
directly; the endpoint is retained for backward compatibility but will
|
||||||
|
be removed in a future release.
|
||||||
x-runtime: [cloud]
|
x-runtime: [cloud]
|
||||||
parameters:
|
parameters:
|
||||||
- name: filename
|
- name: filename
|
||||||
@ -5700,7 +5532,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/CloudError"
|
$ref: "#/components/schemas/CloudError"
|
||||||
|
|
||||||
|
|
||||||
components:
|
components:
|
||||||
parameters:
|
parameters:
|
||||||
ComfyUserHeader:
|
ComfyUserHeader:
|
||||||
@ -7052,7 +6883,6 @@ components:
|
|||||||
error:
|
error:
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------
|
# -------------------------------------------------------------------
|
||||||
# Cloud-runtime schemas
|
# Cloud-runtime schemas
|
||||||
#
|
#
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user