Skip to main content

REDOC_HTML

Constant REDOC_HTML 

Source
const REDOC_HTML: &str = r#"<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Soma REST API — OpenAPI reference</title>
    <style>
      body { margin: 0; padding: 0; }
      .back { font-family: system-ui, sans-serif; font-size: 0.9rem; padding: 0.5rem 1rem; }
    </style>
  </head>
  <body>
    <div class="back"><a href="index.html">&larr; All Soma API docs</a></div>
    <redoc spec-url="openapi.json"></redoc>
    <script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
  </body>
</html>
"#;
Expand description

Static Redoc host page. spec-url is relative so the page works both on GitHub Pages and from a local target/doc/ checkout; the standalone bundle comes from the Redoc CDN (the doc site’s only external asset).