diff --git a/docs/src/components/api-page.client.tsx b/docs/src/components/api-page.client.tsx index 06af8a3..5890ce8 100644 --- a/docs/src/components/api-page.client.tsx +++ b/docs/src/components/api-page.client.tsx @@ -1,4 +1,4 @@ "use client"; -import { defineClientConfig } from "fumadocs-openapi/ui/client"; +import { createOpenAPIPage } from "fumadocs-openapi/ui"; -export default defineClientConfig({}); +export const OpenAPIPage = createOpenAPIPage({}); diff --git a/docs/src/components/api-page.tsx b/docs/src/components/api-page.tsx index 87005b6..045a4ac 100644 --- a/docs/src/components/api-page.tsx +++ b/docs/src/components/api-page.tsx @@ -1,7 +1,22 @@ -import { createAPIPage } from "fumadocs-openapi/ui"; +import type { OpenAPIPageProps_Preloaded } from "fumadocs-openapi/ui"; import { openapi } from "@/lib/openapi"; -import client from "./api-page.client"; +import { OpenAPIPage } from "./api-page.client"; -export const APIPage = createAPIPage(openapi, { client }); +type APIPageProps = Omit; + +export async function APIPage(props: APIPageProps) { + const { document, ...pageProps } = props; + const { bundled } = await openapi.getSchema(document); + + return ( + + ); +}