Skip to main content

SWAGGER_UI_HTML

Constant SWAGGER_UI_HTML 

Source
pub const SWAGGER_UI_HTML: &str = r##"<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>arcly-http — API docs</title>
  <link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist@5/swagger-ui.css">
</head>
<body>
  <div id="swagger-ui"></div>
  <script src="https://unpkg.com/swagger-ui-dist@5/swagger-ui-bundle.js"></script>
  <script>
    window.onload = () => {
      window.ui = SwaggerUIBundle({
        url: '/openapi.json',
        dom_id: '#swagger-ui',
        deepLinking: true,
        persistAuthorization: true,
        layout: 'BaseLayout',
      });
    };
  </script>
</body>
</html>
"##;
Expand description

Minimal Swagger UI page (CDN-hosted assets). No build step, no extra crate.