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:
@@ -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.`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user