import { URLPath } from '@internals/utils' import type { HttpMethod, Operation } from '@kubb/oas' import { Const, File } from '@kubb/react-fabric' import type { FabricReactNode } from '@kubb/react-fabric/types' type OperationsProps = { name: string operations: Array } export function Operations({ name, operations }: OperationsProps): FabricReactNode { const operationsObject: Record = {} operations.forEach((operation) => { operationsObject[operation.getOperationId()] = { path: new URLPath(operation.path).URL, method: operation.method, } }) return ( {JSON.stringify(operationsObject, undefined, 2)} ) }