Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
fix(docs): Use absolute path for openapi.json to fix 500 on /reference pages
The relative path './public/openapi.json' fails to resolve in Vercel serverless functions where process.cwd() differs from the project root. Using path.join(process.cwd(), ...) ensures correct resolution. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
sohamganatra committed
Jan 28, 2026 at 18:18 UTC
d9e448fac378de99eec662129054b76a6f731315
1 file changed
+3
-1
docs/lib/openapi.ts
+3
-1
@@ -1,8 +1,10 @@
1
+import { join } from 'path';
2
import { createOpenAPI } from 'fumadocs-openapi/server';
3
4
// Use local filtered spec (generated by scripts/fetch-openapi.ts)
5
// Run `bun run scripts/fetch-openapi.ts` to update the spec
6
+// Use absolute path to ensure resolution in Vercel serverless functions
7
export const openapi = createOpenAPI({
6
- input: ['./public/openapi.json'],
8
+ input: [join(process.cwd(), 'public/openapi.json')],
9
proxyUrl: '/api/proxy',
10
});