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