docs: add prepare script to generate sidebar (#11894)

This commit is contained in:
Shahed Nasser
2025-03-18 17:37:51 +02:00
committed by GitHub
parent eb2aa8da3c
commit 9ead47c51e
72 changed files with 1709 additions and 295 deletions
@@ -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
}