66 """Serve Scalar documentation page.
69 request (Request): The incoming request.
72 Response: HTML response with Scalar interface.
74 func_title =
"get_documentation"
75 self.
disp.log_debug(
"Serving Scalar documentation", func_title)
79 self.
disp.log_debug(f
"token = {token}", func_title)
83 "theme": SCALAR_CONST.SCALAR_THEME,
84 "layout": SCALAR_CONST.SCALAR_LAYOUT,
85 **SCALAR_CONST.SCALAR_OPTIONS
92 <meta charset="utf-8">
93 <meta name="viewport" content="width=device-width, initial-scale=1">
94 <title>{self.api_title} - Scalar</title>
103 <script id="api-reference" data-url="{self.openapi_url}"></script>
105 var configuration = {json.dumps(config)};
106 document.getElementById('api-reference').dataset.configuration = JSON.stringify(configuration);
108 <script src="{SCALAR_CONST.SCALAR_CDN_URL}"></script>
112 return HCI.success(content=html_content, content_type=HttpDataTypes.HTML)