Skip to content
Snippets Groups Projects
Unverified Commit b2bc74fa authored by Kyle Doherty's avatar Kyle Doherty Committed by GitHub
Browse files

Small bit of api doc styling (#40443)


* tweak styling to better match MB

* add Lato as rapidoc font

---------

Co-authored-by: default avatarAlexander Solovyov <alexander@solovyov.net>
parent 104f18cc
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
<meta charset="utf-8">
<title>Metabase API doc</title>
<script src="rapidoc-min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;0,900;1,400;1,700&display=swap" rel="stylesheet" />
</head>
<body>
<!-- https://rapidocweb.com/api.html -->
......@@ -11,7 +12,9 @@
render-style="read"
heading-text="Metabase"
show-header="false"
allow-server-selection="false">
allow-server-selection="false"
regular-font="Lato, sans-serif"
primary-color="#509ee3">
</rapi-doc>
</body>
</html>
......@@ -87,7 +87,7 @@
"/" (-> (respond "index.html")
;; Better would be to append this to our CSP, but there is no good way right now and it's
;; just a single page. Necessary for rapidoc to work, script injects styles in runtime.
(assoc-in [:headers "Content-Security-Policy"] "style-src 'unsafe-inline'"))
(assoc-in [:headers "Content-Security-Policy"] "script-src 'self' 'unsafe-inline'"))
"/rapidoc-min.js" (respond "rapidoc-min.js")
"/openapi.json" (merge
(api/openapi-object (resolve 'metabase.api.routes/routes))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment