Astra: security review, left-on-pod ledger, chosen scenarios all run, GL navigation and Create Order popup on 26D, health check (ed9256cd4029)
348eedc verified Download coworker/api/openapi_dump.py from EnergyVenom/patchwise-agent-studio: direct link, hf CLI and curl.
- Browser
- Download file 769 Bytes
-
https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/coworker/api/openapi_dump.py
- Command line
-
hf download hf://spaces/EnergyVenom/patchwise-agent-studio/coworker/api/openapi_dump.py
-
curl -L -o openapi_dump.py https://huggingface.co/spaces/EnergyVenom/patchwise-agent-studio/resolve/main/coworker/api/openapi_dump.py
769 Bytes
| """Print the API's OpenAPI JSON (used by web/scripts/gen-api.mjs and the drift test). Uses a throwaway FPT_HOME.""" | |
| from __future__ import annotations | |
| import json | |
| import sys | |
| def openapi_json() -> str: | |
| from ..tests.fakes import temp_settings | |
| from .app import create_app | |
| from ..graph.services import build_services | |
| import logging | |
| before = logging.root.manager.disable # restored after: a caller in the same process (the test run) keeps its logs | |
| logging.disable(logging.CRITICAL) | |
| try: | |
| app = create_app(build_services(temp_settings()), background=False) | |
| return json.dumps(app.openapi(), indent=1, sort_keys=True) | |
| finally: | |
| logging.disable(before) | |
| if __name__ == "__main__": | |
| sys.stdout.write(openapi_json()) | |