/** * Badge component for displaying API version (v3.0, v3.1, etc.) */ export function VersionBadge({ version }: { version: string }) { const isLatest = version === '3.1'; return ( v{version} ); } /** * Extract API version from an endpoint path like /api/v3.1/tools/... * Returns normalized version string (e.g., "3.0", "3.1") */ export function extractVersionFromPath(path: string): string | null { const match = path.match(/\/api\/v([\d.]+)\//); if (!match) return null; return match[1] === '3' ? '3.0' : match[1]; }