fix(openapi): ensure getSchema uses cached schemas (#2919)

This commit is contained in:
Deniz
2026-01-20 07:30:17 +08:00
committed by GitHub
parent 0167b8a4d7
commit 8d1362e46d
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"fumadocs-openapi": minor
---
Fixed a performance issue where getSchema() would bypass the internal cache and re-parse the OpenAPI spec on every call. This was caused by calling the internal getSchemas() function instead of the cached method.
+1 -1
View File
@@ -61,7 +61,7 @@ export function createOpenAPI(options: OpenAPIOptions = {}): OpenAPIServer {
options,
createProxy,
async getSchema(document) {
const schemas = await getSchemas();
const schemas = await this.getSchemas();
if (document in schemas) return schemas[document];
console.warn(