Files
Trilium/apps/build-docs/src/swagger.ts

11 lines
414 B
TypeScript
Raw Normal View History

2025-11-01 20:03:53 +02:00
import BuildContext from "./context";
import { join } from "path";
2025-11-01 20:15:38 +02:00
import { execSync } from "child_process";
2025-11-01 20:03:53 +02:00
export default function buildSwagger({ baseDir }: BuildContext) {
const targetDir = join(baseDir, "api");
2025-11-01 20:15:38 +02:00
const specPath = join(__dirname, "../../server/src/assets/api-openapi.yaml");
execSync(`pnpm redocly build-docs ${specPath} -o ${targetDir}/internal-api.html`, { stdio: "inherit" });
2025-11-01 20:03:53 +02:00
}