This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/website/src/pages/api.jsx
Jens Langhammer 8628595590 website: add API Browser
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
2021-04-18 17:15:19 +02:00

30 lines
941 B
JavaScript

import React from "react";
import Layout from "@theme/Layout";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import useBaseUrl from "@docusaurus/useBaseUrl";
import "rapidoc";
function APIBrowser() {
const context = useDocusaurusContext();
const { siteConfig = {} } = context;
return (
<Layout title="API Browser" description={siteConfig.tagline}>
<rapi-doc
spec-url={useBaseUrl("swagger.yaml")}
allow-try="false"
show-header="false"
theme="dark"
render-style="view"
primary-color="#fd4b2d"
allow-spec-url-load="false"
allow-spec-file-load="false">
<div slot="logo">
<img src={useBaseUrl("img/icon_top_brand.svg")} />
</div>
</rapi-doc>
</Layout>
);
}
export default APIBrowser;