mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-08-06 05:07:53 +00:00
[openapi] Add missing /api/features endpoint and improve schema organization
- Add /api/features endpoint with ServerFeatures response schema - Replace inline objects in /internal/logs/raw with RawLogsResponse schema - Add LogEntry and TerminalSize component schemas for better reusability - Replace inline LogsSubscribeRequest object with proper schema component - Add required field constraints to LogsSubscribeRequest This addresses the missing features endpoint and improves schema consistency by moving complex inline objects to reusable components.
This commit is contained in:
parent
1d2b704160
commit
b5d6064974
94
openapi.yaml
94
openapi.yaml
@ -517,6 +517,20 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
'101':
|
'101':
|
||||||
description: Switching Protocols to WebSocket
|
description: Switching Protocols to WebSocket
|
||||||
|
/api/features:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- system
|
||||||
|
summary: Get server feature flags
|
||||||
|
description: Returns the server's feature flags and capabilities
|
||||||
|
operationId: getFeatures
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Success
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/ServerFeatures'
|
||||||
/internal/logs:
|
/internal/logs:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@ -544,28 +558,7 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: '#/components/schemas/RawLogsResponse'
|
||||||
properties:
|
|
||||||
entries:
|
|
||||||
type: array
|
|
||||||
items:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
t:
|
|
||||||
type: string
|
|
||||||
description: Timestamp
|
|
||||||
m:
|
|
||||||
type: string
|
|
||||||
description: Message
|
|
||||||
size:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
cols:
|
|
||||||
type: integer
|
|
||||||
description: Terminal columns
|
|
||||||
rows:
|
|
||||||
type: integer
|
|
||||||
description: Terminal rows
|
|
||||||
/internal/logs/subscribe:
|
/internal/logs/subscribe:
|
||||||
patch:
|
patch:
|
||||||
tags:
|
tags:
|
||||||
@ -578,14 +571,7 @@ paths:
|
|||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: '#/components/schemas/LogsSubscribeRequest'
|
||||||
properties:
|
|
||||||
clientId:
|
|
||||||
type: string
|
|
||||||
description: Client ID
|
|
||||||
enabled:
|
|
||||||
type: boolean
|
|
||||||
description: Whether to enable or disable subscription
|
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Success
|
description: Success
|
||||||
@ -902,3 +888,51 @@ components:
|
|||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
description: Type of directory the file was stored in
|
description: Type of directory the file was stored in
|
||||||
|
ServerFeatures:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
supports_preview_metadata:
|
||||||
|
type: boolean
|
||||||
|
description: Whether the server supports preview metadata
|
||||||
|
max_upload_size:
|
||||||
|
type: integer
|
||||||
|
description: Maximum file upload size in bytes
|
||||||
|
RawLogsResponse:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
entries:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/LogEntry'
|
||||||
|
size:
|
||||||
|
$ref: '#/components/schemas/TerminalSize'
|
||||||
|
LogEntry:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
t:
|
||||||
|
type: string
|
||||||
|
description: Timestamp
|
||||||
|
m:
|
||||||
|
type: string
|
||||||
|
description: Message
|
||||||
|
TerminalSize:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
cols:
|
||||||
|
type: integer
|
||||||
|
description: Terminal columns
|
||||||
|
rows:
|
||||||
|
type: integer
|
||||||
|
description: Terminal rows
|
||||||
|
LogsSubscribeRequest:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- clientId
|
||||||
|
- enabled
|
||||||
|
properties:
|
||||||
|
clientId:
|
||||||
|
type: string
|
||||||
|
description: Client ID
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
description: Whether to enable or disable subscription
|
||||||
|
Loading…
x
Reference in New Issue
Block a user