diff --git a/.github/workflows/openapi-validation.yml b/.github/workflows/openapi-validation.yml index ce2c5ed34..d5e281bea 100644 --- a/.github/workflows/openapi-validation.yml +++ b/.github/workflows/openapi-validation.yml @@ -5,36 +5,20 @@ on: branches: [ master ] paths: - 'openapi.yaml' + - 'tests-api/openapi.yaml' pull_request: branches: [ master ] paths: - 'openapi.yaml' + - 'tests-api/openapi.yaml' jobs: - openapi-check: + validate: 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: - name: Checkout code 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 uses: actions/setup-python@v4 with: diff --git a/openapi.yaml b/openapi.yaml index d7f2bc0b7..c37102acf 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.3 +openapi: 3.1.0 info: title: ComfyUI API description: 'API for ComfyUI - A powerful and modular UI for Stable Diffusion. @@ -1127,22 +1127,21 @@ components: QueueItem: type: array description: Queue item containing execution details as a 5-element tuple [position, prompt_id, prompt, extra_data, outputs_to_execute] + prefixItems: + - type: number + description: Queue position number (lower numbers have higher priority) + - type: string + format: uuid + description: Unique prompt identifier + - type: object + description: Workflow graph with nodes and connections + additionalProperties: true + - type: object + description: Extra metadata (auth tokens, client info, etc.) + additionalProperties: true + - type: array + description: Array of output node IDs + items: + type: string minItems: 5 maxItems: 5 - items: - oneOf: - - type: number - description: Queue position number (lower numbers have higher priority) - - type: string - format: uuid - description: Unique prompt identifier - - type: object - description: Workflow graph with nodes and connections - additionalProperties: true - - type: object - description: Extra metadata (auth tokens, client info, etc.) - additionalProperties: true - - type: array - description: Array of output node IDs - items: - type: string diff --git a/tests-api/openapi.yaml b/tests-api/openapi.yaml index d7f2bc0b7..c37102acf 100644 --- a/tests-api/openapi.yaml +++ b/tests-api/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.3 +openapi: 3.1.0 info: title: ComfyUI API description: 'API for ComfyUI - A powerful and modular UI for Stable Diffusion. @@ -1127,22 +1127,21 @@ components: QueueItem: type: array description: Queue item containing execution details as a 5-element tuple [position, prompt_id, prompt, extra_data, outputs_to_execute] + prefixItems: + - type: number + description: Queue position number (lower numbers have higher priority) + - type: string + format: uuid + description: Unique prompt identifier + - type: object + description: Workflow graph with nodes and connections + additionalProperties: true + - type: object + description: Extra metadata (auth tokens, client info, etc.) + additionalProperties: true + - type: array + description: Array of output node IDs + items: + type: string minItems: 5 maxItems: 5 - items: - oneOf: - - type: number - description: Queue position number (lower numbers have higher priority) - - type: string - format: uuid - description: Unique prompt identifier - - type: object - description: Workflow graph with nodes and connections - additionalProperties: true - - type: object - description: Extra metadata (auth tokens, client info, etc.) - additionalProperties: true - - type: array - description: Array of output node IDs - items: - type: string