diff --git a/docs/src/components/api/enhanced-api-page.tsx b/docs/src/components/api/enhanced-api-page.tsx index a80e515e0..f844cfdf4 100644 --- a/docs/src/components/api/enhanced-api-page.tsx +++ b/docs/src/components/api/enhanced-api-page.tsx @@ -137,11 +137,11 @@ export function EnhancedAPIPage({ document, operations, description }: EnhancedA // Helper function to generate example data from OpenAPI schema const generateExampleFromSchema = useCallback((schema: OpenAPISchema, spec?: OpenAPISpec): unknown => { - console.log('Processing schema:', JSON.stringify(schema, null, 2)); + //console.log('Processing schema:', JSON.stringify(schema, null, 2)); // Handle $ref references first if (schema.$ref) { - console.log('Found $ref:', schema.$ref); + //console.log('Found $ref:', schema.$ref); const refPath = schema.$ref.replace('#/', '').split('/'); let refSchema: OpenAPISchema | undefined = spec as unknown as OpenAPISchema; for (const part of refPath) { @@ -152,7 +152,7 @@ export function EnhancedAPIPage({ document, operations, description }: EnhancedA // Handle allOf (merge all schemas) if (schema.allOf?.length) { - console.log('Found allOf with', schema.allOf.length, 'schemas'); + //console.log('Found allOf with', schema.allOf.length, 'schemas'); const merged: Record = {}; for (const subSchema of schema.allOf) { const subExample = generateExampleFromSchema(subSchema, spec); @@ -166,17 +166,17 @@ export function EnhancedAPIPage({ document, operations, description }: EnhancedA // Handle oneOf/anyOf (use first schema) if (schema.oneOf?.length || schema.anyOf?.length) { const schemas = schema.oneOf || schema.anyOf; - console.log('Found oneOf/anyOf with', schemas?.length, 'schemas'); + //console.log('Found oneOf/anyOf with', schemas?.length, 'schemas'); return generateExampleFromSchema(schemas![0], spec); } // Handle object type - prioritize this over top-level examples if (schema.type === 'object' && schema.properties) { - console.log('Processing object with properties:', Object.keys(schema.properties)); + //console.log('Processing object with properties:', Object.keys(schema.properties)); const example: Record = {}; Object.entries(schema.properties).forEach(([key, prop]: [string, OpenAPISchema]) => { - console.log(`Processing property ${key}:`, prop); + //console.log(`Processing property ${key}:`, prop); if (prop.example !== undefined) { example[key] = prop.example; @@ -186,13 +186,13 @@ export function EnhancedAPIPage({ document, operations, description }: EnhancedA } }); - console.log('Generated object example:', example); + //console.log('Generated object example:', example); return example; } // Handle direct examples only for non-object types if (schema.example !== undefined) { - console.log('Found direct example:', schema.example); + //console.log('Found direct example:', schema.example); return schema.example; } @@ -217,9 +217,9 @@ export function EnhancedAPIPage({ document, operations, description }: EnhancedA if (operation.requestBody?.content['application/json']?.schema) { const { schema: jsonSchema } = operation.requestBody.content['application/json']; - console.log('OpenAPI Schema for', firstOperation.path, ':', jsonSchema); + //console.log('OpenAPI Schema for', firstOperation.path, ':', jsonSchema); const exampleBody = generateExampleFromSchema(jsonSchema, spec); - console.log('Generated example body:', exampleBody); + //console.log('Generated example body:', exampleBody); setRequestState(prev => ({ ...prev, body: JSON.stringify(exampleBody, null, 2) diff --git a/docs/src/components/api/webhooks-api-page.tsx b/docs/src/components/api/webhooks-api-page.tsx index 4879a39db..974210dd2 100644 --- a/docs/src/components/api/webhooks-api-page.tsx +++ b/docs/src/components/api/webhooks-api-page.tsx @@ -290,9 +290,9 @@ function ModernWebhookDisplay({ const getPayloadExample = useCallback(() => { if (webhook.requestBody?.content['application/json']?.schema) { const jsonContent = webhook.requestBody.content['application/json']; - console.log('Webhook schema:', JSON.stringify(jsonContent.schema, null, 2)); + // console.log('Webhook schema:', JSON.stringify(jsonContent.schema, null, 2)); const examplePayload = generateExampleFromSchema(jsonContent.schema, spec); - console.log('Generated payload:', JSON.stringify(examplePayload, null, 2)); + // console.log('Generated payload:', JSON.stringify(examplePayload, null, 2)); return JSON.stringify(examplePayload, null, 2); } diff --git a/docs/src/components/homepage/iconHover.tsx b/docs/src/components/homepage/iconHover.tsx index 918042b72..f5582173c 100644 --- a/docs/src/components/homepage/iconHover.tsx +++ b/docs/src/components/homepage/iconHover.tsx @@ -318,7 +318,7 @@ export default function DocsSelector() { }, [preferredPlatform, isLoaded]); const handleSectionSelect = (section: DocsSection) => { - console.log("Selected section:", section); + //console.log("Selected section:", section); // Navigate to the selected section if (section.url) { window.location.href = section.url; diff --git a/docs/src/components/layouts/docs-layout-router.tsx b/docs/src/components/layouts/docs-layout-router.tsx index 9e8ff5c13..a6b4f5a61 100644 --- a/docs/src/components/layouts/docs-layout-router.tsx +++ b/docs/src/components/layouts/docs-layout-router.tsx @@ -104,7 +104,7 @@ export function DynamicDocsLayout({ children, ...props }: DynamicDocsLayoutProps if (isInSdkSection(pathname)) { const sdkTree = findSectionInTree(props.tree, 'SDK Reference', pathname); if (sdkTree) { - console.log('🎯 Using SDK tree for:', pathname); + //console.log('🎯 Using SDK tree for:', pathname); return sdkTree; } } @@ -112,13 +112,13 @@ export function DynamicDocsLayout({ children, ...props }: DynamicDocsLayoutProps if (isInComponentsSection(pathname)) { const componentsTree = findSectionInTree(props.tree, 'Components', pathname); if (componentsTree) { - console.log('🎯 Using Components tree for:', pathname); + //console.log('🎯 Using Components tree for:', pathname); return componentsTree; } } // For normal docs view, filter out SDK and Components sections - console.log('📄 Using filtered page tree for:', pathname); + //console.log('📄 Using filtered page tree for:', pathname); return { ...props.tree, children: props.tree.children.map(platformNode => {