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.

refactor(docs): import shared types instead of duplicating

Sushmithamallesh0dc7e28d0030
diff --git a/docs/components/custom-schema-ui.tsx b/docs/components/custom-schema-ui.tsx
index c178bf750..fdc71ecf0 100644
--- a/docs/components/custom-schema-ui.tsx
+++ b/docs/components/custom-schema-ui.tsx
@@ -1,12 +1,6 @@
'use client';
-import {
- createContext,
- Fragment,
- use,
- useState,
- type ReactNode,
-} from 'react';
+import { createContext, Fragment, use, useState } from 'react';
import {
Collapsible,
CollapsibleContent,
@@ -14,33 +8,7 @@ import {
} from 'fumadocs-ui/components/ui/collapsible';
import { cn } from '@/lib/utils';
import { Plus, X } from 'lucide-react';
-
-// Types from fumadocs-openapi
-interface FieldBase {
- description?: ReactNode;
- infoTags?: ReactNode[];
- typeName: string;
- aliasName: string;
- deprecated?: boolean;
- enumValues?: string[];
-}
-
-type SchemaData = FieldBase &
- (
- | { type: 'primitive' }
- | {
- type: 'object';
- props: { name: string; $type: string; required: boolean }[];
- }
- | { type: 'array'; item: { $type: string } }
- | { type: 'or'; items: { name: string; $type: string }[] }
- | { type: 'and'; items: { name: string; $type: string }[] }
- );
-
-interface SchemaUIGeneratedData {
- $root: string;
- refs: Record<string, SchemaData>;
-}
+import type { SchemaData, SchemaUIGeneratedData } from './schema-generator';
interface SchemaUIProps {
name: string;