removal of circular call

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Jokob @NetAlertX
2025-12-08 01:43:32 +00:00
committed by GitHub
parent 8e10f5eb66
commit 77659afa9e

View File

@@ -67,9 +67,10 @@ def get_openapi_spec():
if _openapi_spec_cache:
return _openapi_spec_cache
try:
r = requests.get(f"{API_BASE_URL}/mcp/openapi.json", timeout=10)
r.raise_for_status()
_openapi_spec_cache = r.json()
# Call the openapi_spec function directly instead of making HTTP request
# to avoid circular requests and authorization issues
response = openapi_spec()
_openapi_spec_cache = response.get_json()
return _openapi_spec_cache
except Exception as e:
mylog("none", [f"[MCP] Failed to fetch OpenAPI spec: {e}"])