mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-09 07:10:10 +00:00
[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
This commit is contained in:
@@ -93,8 +93,8 @@ def api_client(base_url: str) -> Generator[Optional[requests.Session], None, Non
|
||||
|
||||
# Helper function to construct URLs
|
||||
def get_url(path: str) -> str:
|
||||
# All API endpoints use the /api prefix
|
||||
return urljoin(base_url, '/api' + path)
|
||||
# Paths in the OpenAPI spec already include /api prefix where needed
|
||||
return urljoin(base_url, path)
|
||||
|
||||
# Add url helper to the session
|
||||
session.get_url = get_url # type: ignore
|
||||
|
||||
Reference in New Issue
Block a user