mirror of
https://github.com/Dokploy/website.git
synced 2026-06-19 22:25:24 +02:00
- 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.
20 lines
456 B
JavaScript
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);
|
|
}
|