mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-04 09:11:34 -07:00
@@ -67,9 +67,10 @@ def get_openapi_spec():
|
|||||||
if _openapi_spec_cache:
|
if _openapi_spec_cache:
|
||||||
return _openapi_spec_cache
|
return _openapi_spec_cache
|
||||||
try:
|
try:
|
||||||
r = requests.get(f"{API_BASE_URL}/mcp/openapi.json", timeout=10)
|
# Call the openapi_spec function directly instead of making HTTP request
|
||||||
r.raise_for_status()
|
# to avoid circular requests and authorization issues
|
||||||
_openapi_spec_cache = r.json()
|
response = openapi_spec()
|
||||||
|
_openapi_spec_cache = response.get_json()
|
||||||
return _openapi_spec_cache
|
return _openapi_spec_cache
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
mylog("none", [f"[MCP] Failed to fetch OpenAPI spec: {e}"])
|
mylog("none", [f"[MCP] Failed to fetch OpenAPI spec: {e}"])
|
||||||
|
|||||||
Reference in New Issue
Block a user