2022-04-26 15:00:53 +00:00
|
|
|
import dynamic from "next/dynamic";
|
2022-04-15 12:56:22 +00:00
|
|
|
|
2022-04-19 08:50:40 +00:00
|
|
|
import { SnippedGenerator, requestSnippets } from "@lib/snippets";
|
|
|
|
|
2022-04-26 15:00:53 +00:00
|
|
|
const SwaggerUI: any = dynamic(() => import("swagger-ui-react"), { ssr: false });
|
|
|
|
|
2022-04-15 12:56:22 +00:00
|
|
|
export default function APIDocs() {
|
|
|
|
return (
|
2022-04-16 01:35:49 +00:00
|
|
|
<SwaggerUI
|
2022-04-19 08:50:40 +00:00
|
|
|
url={process.env.NEXT_PUBLIC_SWAGGER_DOCS_URL || "https://api.cal.com/docs"}
|
2022-04-26 15:00:53 +00:00
|
|
|
supportedSubmitMethods={["get", "post", "delete", "patch"]}
|
2022-04-16 01:35:49 +00:00
|
|
|
requestSnippetsEnabled={true}
|
2022-04-19 08:50:40 +00:00
|
|
|
requestSnippets={requestSnippets}
|
|
|
|
plugins={[SnippedGenerator]}
|
|
|
|
tryItOutEnabled={true}
|
|
|
|
syntaxHighlight={true}
|
2022-04-16 01:35:49 +00:00
|
|
|
docExpansion="none"
|
|
|
|
filter={true}
|
|
|
|
/>
|
2022-04-15 12:56:22 +00:00
|
|
|
);
|
|
|
|
}
|