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:
@@ -5,6 +5,7 @@ import { GitManager } from "../classes/helpers/git-manager.js"
|
||||
import { CommonCliOptions } from "../types/index.js"
|
||||
import OasGenerator from "../classes/generators/oas.js"
|
||||
import DmlGenerator from "../classes/generators/dml.js"
|
||||
import RouteExamplesGenerator from "../classes/generators/route-examples.js"
|
||||
|
||||
export default async function runGitChanges({
|
||||
type,
|
||||
@@ -53,5 +54,14 @@ export default async function runGitChanges({
|
||||
await dmlGenerator.run()
|
||||
}
|
||||
|
||||
if (type === "all" || type === "route-examples") {
|
||||
const routeExamplesGenerator = new RouteExamplesGenerator({
|
||||
paths: files,
|
||||
...options,
|
||||
})
|
||||
|
||||
await routeExamplesGenerator.run()
|
||||
}
|
||||
|
||||
console.log(`Finished generating docs for ${files.length} files.`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user