Skip to content

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): prevent infinite recursion on circular schema refs

Sushmithamallesh69c2b40c645b
diff --git a/docs/components/schema-generator.tsx b/docs/components/schema-generator.tsx
index c5e472310..6b6c9d12f 100644
--- a/docs/components/schema-generator.tsx
+++ b/docs/components/schema-generator.tsx
@@ -110,6 +110,9 @@ export function generateSchemaData(
const id = getSchemaId(schema);
if (id in refs) return id;
+ // Mark as processing to prevent infinite recursion on circular refs
+ refs[id] = { type: 'primitive', typeName: 'any', aliasName: 'any' };
+
// For arrays, aliasName is the item type (used in "array of X" display)
const aliasName =
schema.type === 'array' && schema.items