{# Bengal OpenAPI Endpoint Header Displays: Title, description, auth badges, tags Uses Kida's {% with ... as ... %} for nil-safe optional sections. Context: - element: DocElement with OpenAPIEndpointMetadata - element.typed_metadata: OpenAPIEndpointMetadata #} {% let meta = element.typed_metadata %} {% let method = meta?.method ?? 'GET' %} {% let path = meta?.path ?? '/unknown' %} {% let summary = meta?.summary ?? element.name %} {% let operation_id = meta?.operation_id %} {% let tags = meta?.tags ?? () %} {% let security = meta?.security ?? () %}
{# Breadcrumb / Tag Path #} {% if tags %} {% end %} {# Title: Summary or Operation ID #}

{{ summary }}

{# Operation ID (for developers) #} {% with operation_id as op_id %}
{{ op_id }}
{% end %} {# Description #} {% with element.description as desc %}
{{ desc | markdownify | safe }}
{% end %} {# Meta Badges Row #}
{# Authentication Requirements #} {% if security %}
{% for scheme in security %} {{ scheme }} {% end %}
{% end %} {# Tags #} {% if tags %}
{% for tag in tags %} {{ tag }} {% end %}
{% end %}