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): handle boolean root schema in getRawRef call
options.root can be boolean for simple schemas. Only call getRawRef when it's an object to avoid type error. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sushmithamallesh committed
Feb 4, 2026 at 13:44 UTC
ebcc7a23e8382bd2b35c8c6902c533ee19de20f9
1 file changed
+5
-1
docs/components/api-page.tsx
+5
-1
@@ -12,7 +12,11 @@ export const APIPage = createAPIPage(openapi, {
12
render: (options, ctx) => {
13
// Skip rendering the shared Error schema on error responses -
14
// the status code and description are shown by the accordion already
15
- const ref = ctx.schema.getRawRef(options.root);
15
+ // options.root can be boolean for simple schemas, only check refs for objects
16
+ const ref =
17
+ typeof options.root === 'object'
18
+ ? ctx.schema.getRawRef(options.root)
19
+ : null;
20
if (ref === '#/components/schemas/Error') return null;
21
22
const generated = generateSchemaData(