import clsx from 'clsx'; import type { OpenAPICustomOperationProperties, OpenAPIV3 } from '@gitbook/openapi-parser'; import { Markdown } from './Markdown'; import { OpenAPICodeSample } from './OpenAPICodeSample'; import { OpenAPIPath } from './OpenAPIPath'; import { OpenAPIResponseExample } from './OpenAPIResponseExample'; import { OpenAPISpec } from './OpenAPISpec'; import type { OpenAPIClientContext, OpenAPIContextProps, OpenAPIOperationData } from './types'; import { resolveDescription } from './utils'; /** * Display an interactive OpenAPI operation. */ export function OpenAPIOperation(props: { className?: string; data: OpenAPIOperationData; context: OpenAPIContextProps; }) { const { className, data, context } = props; const { operation } = data; const clientContext: OpenAPIClientContext = { defaultInteractiveOpened: context.defaultInteractiveOpened, icons: context.icons, blockKey: context.blockKey, }; return (