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): preserve nested required fields beyond first nesting level
getChildren was spreading raw JSON Schema values without mapping the child's `required` array to `requiredFields`, causing all parameters nested two or more levels deep to display as not required. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sushmithamallesh committed
Feb 5, 2026 at 21:31 UTC
12025e32d2280aaf97718e600c6ab006dd8f4a89
1 file changed
+5
-1
docs/components/toolkits/toolkit-detail.tsx
+5
-1
@@ -65,9 +65,13 @@ function getChildren(param: ParameterSchema): Record<string, ParameterSchema> |
65
const result: Record<string, ParameterSchema> = {};
66
for (const [key, value] of Object.entries(props)) {
67
if (typeof value === 'object' && value !== null) {
68
+ const raw = value as ParameterSchema & { required?: string[] | boolean };
69
result[key] = {
69
- ...(value as ParameterSchema),
70
+ ...raw,
71
required: Array.isArray(requiredList) ? requiredList.includes(key) : false,
72
+ // Map the child's own JSON Schema required array to requiredFields
73
+ // so that deeper nesting levels preserve required info
74
+ ...(Array.isArray(raw.required) ? { requiredFields: raw.required } : {}),
75
};
76
}
77
}