Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 10:45 UTC
refactor(docs): import shared types instead of duplicating
Import SchemaData and SchemaUIGeneratedData from schema-generator.tsx instead of redefining them in custom-schema-ui.tsx. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sushmithamallesh committed
Feb 4, 2026 at 14:15 UTC
0dc7e28d00303c971844726ec8078511e3af8f50
1 file changed
+2
-34
docs/components/custom-schema-ui.tsx
+2
-34
@@ -1,12 +1,6 @@
1
'use client';
2
3
-import {
4
- createContext,
5
- Fragment,
6
- use,
7
- useState,
8
- type ReactNode,
9
-} from 'react';
3
+import { createContext, Fragment, use, useState } from 'react';
4
import {
5
Collapsible,
6
CollapsibleContent,
@@ -14,33 +8,7 @@ import {
8
} from 'fumadocs-ui/components/ui/collapsible';
9
import { cn } from '@/lib/utils';
10
import { Plus, X } from 'lucide-react';
17
-
18
-// Types from fumadocs-openapi
19
-interface FieldBase {
20
- description?: ReactNode;
21
- infoTags?: ReactNode[];
22
- typeName: string;
23
- aliasName: string;
24
- deprecated?: boolean;
25
- enumValues?: string[];
26
-}
27
-
28
-type SchemaData = FieldBase &
29
- (
30
- | { type: 'primitive' }
31
- | {
32
- type: 'object';
33
- props: { name: string; $type: string; required: boolean }[];
34
- }
35
- | { type: 'array'; item: { $type: string } }
36
- | { type: 'or'; items: { name: string; $type: string }[] }
37
- | { type: 'and'; items: { name: string; $type: string }[] }
38
- );
39
-
40
-interface SchemaUIGeneratedData {
41
- $root: string;
42
- refs: Record<string, SchemaData>;
43
-}
11
+import type { SchemaData, SchemaUIGeneratedData } from './schema-generator';
12
13
interface SchemaUIProps {
14
name: string;