This commit is contained in:
seb
2026-10-04 20:47:16 +02:00
parent d56b3e5c23
commit 6777f423d8
4 changed files with 9 additions and 6 deletions

View File

@@ -1,5 +1,7 @@
/**
* Code-first API docs: scan `@openapi` JSDoc in routes → OpenAPI JSON + Markdown under docs/api/.
* Code-first API docs: scan `@openapi` JSDoc in routes → Markdown under docs/api/.
* The OpenAPI JSON is NOT written to disk; the interactive docs at /docs/ build it from
* source at runtime via getOpenApiSpec() (src/api/openapiSpec.js).
*
* Usage: npm run docs:api
*/
@@ -768,6 +770,6 @@ fs.writeFileSync(
);
fs.writeFileSync(path.join(docsDir, 'routes-all.md'), renderRoutesOverview(operations, 'Dash API Routes Overview (All)'));
fs.writeFileSync(path.join(docsDir, 'README.md'), renderReadme(operations));
fs.writeFileSync(path.join(docsDir, 'openapi.json'), JSON.stringify(spec, null, 2));
console.log(`Wrote ${operations.length} route docs + ${overviewOperations.length} in routes.md + ${operations.length} in routes-all.md + openapi.json → docs/api/`);
console.log(`Wrote ${operations.length} route docs + ${overviewOperations.length} in routes.md + ${operations.length} in routes-all.md → docs/api/`);
console.log('No openapi.json written — the interactive docs at /docs/ build it from source at runtime.');