fix duplicated schemas in openapi

This commit is contained in:
bymyself 2025-06-17 10:36:31 -07:00
parent 1bdb026079
commit 65f0764338

View File

@ -18,6 +18,14 @@ security: []
# Common API components # Common API components
components: components:
schemas: schemas:
OperationType:
type: string
enum: [install, uninstall, update, update-all, update-comfyui, fix, disable, enable, install-model]
description: Type of operation or task being performed
OperationResult:
type: string
enum: [success, failed, skipped, error, skip]
description: Result status of an operation (failed/error and skipped/skip are aliases)
# Core Task Queue Models # Core Task Queue Models
QueueTaskItem: QueueTaskItem:
type: object type: object
@ -29,9 +37,7 @@ components:
type: string type: string
description: Client identifier that initiated the task description: Client identifier that initiated the task
kind: kind:
type: string $ref: '#/components/schemas/OperationType'
description: Type of task being performed
enum: [install, uninstall, update, update-all, update-comfyui, fix, disable, enable, install-model]
params: params:
oneOf: oneOf:
- $ref: '#/components/schemas/InstallPackParams' - $ref: '#/components/schemas/InstallPackParams'
@ -70,9 +76,7 @@ components:
type: object type: object
properties: properties:
status_str: status_str:
type: string $ref: '#/components/schemas/OperationResult'
enum: [success, error, skip]
description: Overall task execution status
completed: completed:
type: boolean type: boolean
description: Whether the task completed description: Whether the task completed
@ -235,7 +239,7 @@ components:
type: array type: array
items: items:
type: string type: string
description: Files included in the pack description: Repository URLs for installation (typically contains one GitHub URL)
reference: reference:
type: string type: string
description: The type of installation reference description: The type of installation reference
@ -580,9 +584,7 @@ components:
type: string type: string
description: Unique operation identifier description: Unique operation identifier
operation_type: operation_type:
type: string $ref: '#/components/schemas/OperationType'
description: Type of operation
enum: [install, update, uninstall, fix, disable, enable, install-model]
target: target:
type: string type: string
description: Target of the operation (node name, model name, etc.) description: Target of the operation (node name, model name, etc.)
@ -590,9 +592,7 @@ components:
type: [string, 'null'] type: [string, 'null']
description: Target version for the operation description: Target version for the operation
result: result:
type: string $ref: '#/components/schemas/OperationResult'
description: Operation result
enum: [success, failed, skipped]
error_message: error_message:
type: [string, 'null'] type: [string, 'null']
description: Error message if operation failed description: Error message if operation failed