@@ -31,6 +31,12 @@ const navigationItems = [
description: "View API documentation",
icon: FileText,
},
+ {
+ title: "API Docs2",
+ href: "/reference",
+ description: "View API documentation",
+ icon: FileText,
+ },
];
const userMenuItems = [
@@ -0,0 +1,8 @@
+// app/reference/route.ts
+import { ApiReference } from '@scalar/nextjs-api-reference'
+
+const config = {
+ url: '/api/openapi.json',
+}
+export const GET = ApiReference(config)
@@ -5,5 +5,5 @@ export default function middleware(request: Request) {
}
export const config = {
- matcher: ["/files/:path*", "/api-docs/:path*", "/api/:path*"],
+ matcher: ["/files/:path*", "/api-docs/:path*", "/api/:path*", "/reference/:path*"],
};