{{/* For operation pages, show method badge with title */}}
{{ with .Params.method }}
{{/* Download OpenAPI spec button - context-aware for Clustered/Cloud Dedicated */}}
{{ with .Params.staticFilePath }}
{{/* Extract product name from path like /openapi/influxdb-oss-v2/tags/... */}}
{{ $productName := replaceRE `^/openapi/([^/]+)/.*$` "$1" . }}
{{/* Check if this is a dual-API product (Clustered or Cloud Dedicated) */}}
{{ $isDualApi := or (strings.Contains $productName "clustered") (strings.Contains $productName "cloud-dedicated") }}
{{ if $isDualApi }}
{{/* Determine API type from path */}}
{{ $isManagementApi := strings.Contains . "management-api" }}
{{ if $isManagementApi }}
{{ $specPath := printf "/openapi/%s-management-api.yml" $productName }}
{{ else }}
{{ $specPath := printf "/openapi/%s-v2-data-api.yml" $productName }}
{{ end }}
{{ else }}
{{/* Single-spec products - existing behavior */}}
{{ $completeSpecPath := printf "/openapi/%s.yml" $productName }}
{{ end }}
{{ end }}
{{ upper . }}
{{ with $.Params.path }}
{{ $.Title }}
{{ . }}
{{ end }}
{{ else }}
{{ .Title }}
{{ end }} {{/* Summary/Description - skip for conceptual pages (shown in content section) */}} {{ if not (.Params.isConceptual | default false) }} {{ with .Params.summary }}{{ . | markdownify }}
{{ else }} {{ with .Description }}{{ . | markdownify }}
{{ end }} {{ end }} {{ end }}