docs: add prepare script to generate sidebar (#11894)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { promises as fs } from "fs"
|
||||
import { OpenAPIV3 } from "openapi-types"
|
||||
import { OpenAPI } from "types"
|
||||
import { parseDocument } from "yaml"
|
||||
|
||||
export default async function readSpecDocument(filePath: string) {
|
||||
const fileContent = await fs.readFile(filePath, "utf-8")
|
||||
return parseDocument(fileContent).toJS() as OpenAPIV3.PathItemObject
|
||||
return parseDocument(fileContent).toJS() as OpenAPI.OpenAPIV3.PathItemObject
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user