docs-util: add tool to generate mapping between JS SDK examples and routes (#11933)

* initial implementation

* finish implementation

* add js sdk key
This commit is contained in:
Shahed Nasser
2025-03-21 15:34:52 +02:00
committed by GitHub
parent 834b309037
commit df5ae50612
11 changed files with 1025 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ import OasGenerator from "../classes/generators/oas.js"
import { CommonCliOptions } from "../types/index.js"
import { GitManager } from "../classes/helpers/git-manager.js"
import DmlGenerator from "../classes/generators/dml.js"
import RouteExamplesGenerator from "../classes/generators/route-examples.js"
export default async function (
commitSha: string,
@@ -61,5 +62,14 @@ export default async function (
await dmlGenerator.run()
}
if (type === "all" || type === "route-examples") {
const routeExamplesGenerator = new RouteExamplesGenerator({
paths: filteredFiles,
...options,
})
await routeExamplesGenerator.run()
}
console.log(`Finished generating docs for ${filteredFiles.length} files.`)
}