Files
website/apps/docs-new/generate-docs.mjs
Mauricio Siu baaf062975 feat: update API documentation and OpenAPI integration
- Refactored API documentation generation to utilize the new `fumadocs-openapi` features, including improved error handling and output structure.
- Replaced the Authorization security scheme with x-api-key for enhanced API key authentication.
- Added new MDX files for various API endpoints, ensuring comprehensive documentation coverage.
- Updated the OpenAPI specification to reflect the latest changes in security definitions and response schemas.
- Enhanced the documentation generation script to streamline the process and ensure consistency.
2025-12-07 06:05:00 -06:00

20 lines
456 B
JavaScript

import { generateFiles } from "fumadocs-openapi";
import { createOpenAPI } from "fumadocs-openapi/server";
const openapi = createOpenAPI({
input: ["./public/openapi.json"],
});
try {
await generateFiles({
input: openapi,
output: "./content/docs/api",
per: "tag",
includeDescription: true,
});
console.log("✓ Generated API documentation files");
} catch (error) {
console.error("Error generating docs:", error.message);
process.exit(1);
}