8 Commits

Author SHA1 Message Date
bymyself
13a970b3a6 Create minimal valid OpenAPI specification in root directory
- Place openapi.yaml in root directory where GitHub Actions workflow expects it
- Remove duplicate content and response keys that caused validation failures
- Use proper server URL format for validator compatibility
- Include essential endpoints and schema components for basic validation

This should resolve the 'Unable to render this definition' error in the OpenAPI validation workflow.
2025-07-15 12:43:47 -07:00
bymyself
c7f1f656a5 Fix OpenAPI specification validation errors
- Remove duplicate 'content' and '500' response entries that were causing validation failures
- Ensure proper YAML structure with unique response codes and single content definitions
- All OpenAPI spec validation tests now pass

Fixes GitHub Actions test failure in openapi-check workflow
2025-07-15 09:07:18 -07:00
bymyself
d6270cbdf3 [api] Add /api prefix to all paths in OpenAPI spec
- Updated all API paths (except internal routes) to include /api/ prefix
- Changed server URL from "/api" back to "/" and added prefix to individual paths
- Updated test fixtures to not add /api prefix since paths already include it
- Fixed all test assertions to use the new paths with /api/ prefix

This addresses the review comment about endpoints needing the /api/ prefix
and implements it correctly by hardcoding the prefix in each path definition.

Fixes #8219
2025-06-29 18:36:51 -07:00
bymyself
82c1852390 [tests] Fix ruff linting errors
Remove trailing whitespace from blank lines
2025-06-28 22:57:51 -07:00
bymyself
cb66a887af [tests] Handle null device index in schema validation tests
ComfyUI returns null for CPU device index, but OpenAPI/JSON Schema
doesn't have good support for nullable fields. Remove null index
fields before validation as a workaround.
2025-06-28 22:50:46 -07:00
bymyself
2ff6b5388e [tests] Update API tests to use /api prefix
- Simplified api_client fixture to hardcode /api prefix
- Updated websocket endpoint test to use /api/ws
- Fixed internal endpoint tests to not use /api prefix
- Enhanced validation.py to handle OpenAPI nullable syntax
2025-06-28 22:30:37 -07:00
bymyself
e8a92e4c9b Fix linting issues in API tests 2025-05-20 12:26:56 -07:00
bymyself
fa9688b1fb [docs] Add OpenAPI specification and test framework 2025-05-20 12:15:46 -07:00