u
This commit is contained in:
@@ -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.');
|
||||
|
||||
Reference in New Issue
Block a user