mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-09 00:21:13 +08:00
19 lines
468 B
TypeScript
19 lines
468 B
TypeScript
import { rmSync } from "node:fs";
|
|
|
|
import { generateFiles } from "fumadocs-openapi";
|
|
import { openapi } from "@/lib/openapi";
|
|
|
|
const outputDir = "./content/docs/openapi/(generated)";
|
|
|
|
rmSync(outputDir, { recursive: true, force: true });
|
|
|
|
void generateFiles({
|
|
input: openapi,
|
|
output: outputDir,
|
|
// we recommend to enable it
|
|
// make sure your endpoint description doesn't break MDX syntax.
|
|
includeDescription: true,
|
|
per: "operation",
|
|
groupBy: "route",
|
|
});
|