clan-app: Add swagger redirect
This commit is contained in:
@@ -85,10 +85,7 @@ def app_run(app_opts: ClanAppOptions) -> int:
|
||||
# HTTP-only mode - keep the server running
|
||||
log.info("HTTP API server running...")
|
||||
log.info(
|
||||
f"Available API methods at: http://{app_opts.http_host}:{app_opts.http_port}/api/methods"
|
||||
)
|
||||
log.info(
|
||||
f"Example request: curl -X POST http://{app_opts.http_host}:{app_opts.http_port}/api/v1/list_log_days"
|
||||
f"Swagger: http://{app_opts.http_host}:{app_opts.http_port}/api/swagger"
|
||||
)
|
||||
|
||||
log.info("Press Ctrl+C to stop the server")
|
||||
|
||||
@@ -74,8 +74,8 @@ class HttpBridge(ApiBridge, BaseHTTPRequestHandler):
|
||||
response_dict = dataclass_to_dict(response)
|
||||
self._send_json_response_with_status(response_dict, 200)
|
||||
log.debug(
|
||||
f"HTTP response for {response._op_key}: {json.dumps(response_dict, indent=2)}"
|
||||
) # noqa: SLF001
|
||||
f"HTTP response for {response._op_key}: {json.dumps(response_dict, indent=2)}" # noqa: SLF001
|
||||
)
|
||||
|
||||
def _create_success_response(
|
||||
self, op_key: str, data: dict[str, Any]
|
||||
|
||||
Reference in New Issue
Block a user