next-openapi-gen
Version:
Automatically generate OpenAPI 3.0 documentation from Next.js projects, with support for Zod schemas and TypeScript types.
21 lines (18 loc) • 410 B
JavaScript
export const rapidocDeps = ["rapidoc"];
export function RapidocUI(outputFile) {
return `
"use client";
import "rapidoc";
export default function ApiDocsPage() {
return (
<section style={{ height: "100vh" }}>
<rapi-doc
spec-url="${outputFile}"
render-style="read"
style={{ height: "100vh", width: "100%" }}
></rapi-doc>
</section>
);
}
`;
}