{# Bengal OpenAPI List Page ======================== Consolidated endpoint list for a tag/category section. Groups multiple endpoints under a single tag with method badges. Context: - element: DocElement (optional, for tag info) - section: Section containing endpoints - page: Page object - site: Site instance - config: Config instance The `endpoints` filter normalizes access to endpoint data regardless of whether the source is DocElements (consolidated mode) or Pages (individual mode). Each EndpointView provides: - method: HTTP method - path: URL path - summary: Short description - deprecated: Deprecation status - href: Always valid link (anchor in consolidated mode, page URL otherwise) - has_page: Whether individual page exists Kida Features: - {% with %} for nil-resilient optional sections - {% spaceless %} for compact badge output - Optional chaining (?.) and null coalescing (??) #} {% extends 'autodoc/openapi/layouts/reference.html' %} {% let tag_name = element?.name ?? section?.title ?? page?.title ?? 'Endpoints' %} {% let tag_desc = element?.description ?? section?.metadata?.description ?? '' %} {% let eps = section | endpoints %} {% block header %}

{{ tag_name }}

{% if tag_desc %}
{{ tag_desc | markdownify | safe }}
{% end %}
{{ eps | length }} endpoints
{% end %} {% block content_main %}
{# Endpoint Table #} {% if eps | length > 0 %}
{% for ep in eps %} {% end %}
Method Endpoint Description
{% spaceless %} {{ ep.method }} {% end %} {% if ep.has_page %} {{ ep.path | highlight_path_params | safe }} {% else %} {{ ep.path | highlight_path_params | safe }} {% end %} {% if ep.deprecated %} Deprecated {% end %} {{ ep.summary | truncate(100) }}
{% else %} {# Empty State #}
{{ icon('inbox', size=48, class='autodoc-empty-state-icon') }}

No endpoints in this category

{% end %} {# Cards View (Alternative) #} {% if eps | length > 0 %}

Quick Reference

{% for ep in eps %} {% if ep.has_page %}
{% spaceless %} {{ ep.method }} {% end %} {{ ep.path | highlight_path_params | safe }}
{% if ep.summary %}

{{ ep.summary | truncate(80) }}

{% end %} {% if ep.deprecated %} Deprecated {% end %}
{% else %}
{% spaceless %} {{ ep.method }} {% end %} {{ ep.path | highlight_path_params | safe }}
{% if ep.summary %}

{{ ep.summary | truncate(80) }}

{% end %} {% if ep.deprecated %} Deprecated {% end %}
{% end %} {% end %}
{% end %}
{% end %}