cal.pub0.org/apps/swagger/pages/index.tsx

22 lines
628 B
TypeScript
Raw Normal View History

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