mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-27 08:16:44 +00:00
Upgrade to OpenAPI 3.1.0 with prefixItems and streamlined validation
- Upgraded OpenAPI spec from 3.0.3 to 3.1.0 - Replaced QueueItem oneOf pattern with prefixItems for precise tuple validation - Simplified GitHub Actions workflow to use only Python tests (removed redundant swagger-editor validation) - All validation now handled by openapi-spec-validator which supports OpenAPI 3.1 - QueueItem now enforces exact tuple structure: [position, prompt_id, prompt, extra_data, outputs_to_execute]
This commit is contained in:
parent
7a691c980f
commit
1eb00c0a51
22
.github/workflows/openapi-validation.yml
vendored
22
.github/workflows/openapi-validation.yml
vendored
@ -5,36 +5,20 @@ on:
|
|||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
paths:
|
paths:
|
||||||
- 'openapi.yaml'
|
- 'openapi.yaml'
|
||||||
|
- 'tests-api/openapi.yaml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
paths:
|
paths:
|
||||||
- 'openapi.yaml'
|
- 'openapi.yaml'
|
||||||
|
- 'tests-api/openapi.yaml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
openapi-check:
|
validate:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
# Service containers to run with `runner-job`
|
|
||||||
services:
|
|
||||||
# Label used to access the service container
|
|
||||||
swagger-editor:
|
|
||||||
# Docker Hub image
|
|
||||||
image: swaggerapi/swagger-editor
|
|
||||||
ports:
|
|
||||||
# Maps port 8080 on service container to the host 80
|
|
||||||
- 80:8080
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Validate OpenAPI definition
|
|
||||||
uses: swaggerexpert/swagger-editor-validate@v1
|
|
||||||
with:
|
|
||||||
definition-file: openapi.yaml
|
|
||||||
swagger-editor-url: http://localhost/
|
|
||||||
default-timeout: 20000
|
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
openapi: 3.0.3
|
openapi: 3.1.0
|
||||||
info:
|
info:
|
||||||
title: ComfyUI API
|
title: ComfyUI API
|
||||||
description: 'API for ComfyUI - A powerful and modular UI for Stable Diffusion.
|
description: 'API for ComfyUI - A powerful and modular UI for Stable Diffusion.
|
||||||
@ -1127,10 +1127,7 @@ components:
|
|||||||
QueueItem:
|
QueueItem:
|
||||||
type: array
|
type: array
|
||||||
description: Queue item containing execution details as a 5-element tuple [position, prompt_id, prompt, extra_data, outputs_to_execute]
|
description: Queue item containing execution details as a 5-element tuple [position, prompt_id, prompt, extra_data, outputs_to_execute]
|
||||||
minItems: 5
|
prefixItems:
|
||||||
maxItems: 5
|
|
||||||
items:
|
|
||||||
oneOf:
|
|
||||||
- type: number
|
- type: number
|
||||||
description: Queue position number (lower numbers have higher priority)
|
description: Queue position number (lower numbers have higher priority)
|
||||||
- type: string
|
- type: string
|
||||||
@ -1146,3 +1143,5 @@ components:
|
|||||||
description: Array of output node IDs
|
description: Array of output node IDs
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
minItems: 5
|
||||||
|
maxItems: 5
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
openapi: 3.0.3
|
openapi: 3.1.0
|
||||||
info:
|
info:
|
||||||
title: ComfyUI API
|
title: ComfyUI API
|
||||||
description: 'API for ComfyUI - A powerful and modular UI for Stable Diffusion.
|
description: 'API for ComfyUI - A powerful and modular UI for Stable Diffusion.
|
||||||
@ -1127,10 +1127,7 @@ components:
|
|||||||
QueueItem:
|
QueueItem:
|
||||||
type: array
|
type: array
|
||||||
description: Queue item containing execution details as a 5-element tuple [position, prompt_id, prompt, extra_data, outputs_to_execute]
|
description: Queue item containing execution details as a 5-element tuple [position, prompt_id, prompt, extra_data, outputs_to_execute]
|
||||||
minItems: 5
|
prefixItems:
|
||||||
maxItems: 5
|
|
||||||
items:
|
|
||||||
oneOf:
|
|
||||||
- type: number
|
- type: number
|
||||||
description: Queue position number (lower numbers have higher priority)
|
description: Queue position number (lower numbers have higher priority)
|
||||||
- type: string
|
- type: string
|
||||||
@ -1146,3 +1143,5 @@ components:
|
|||||||
description: Array of output node IDs
|
description: Array of output node IDs
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
|
minItems: 5
|
||||||
|
maxItems: 5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user