{# 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 api_left %} {% end %} {% block api_header %} Resource group

{{ tag_name }}

{% if tag_desc %}
{{ tag_desc | markdownify | safe }}
{% end %}
{{ eps | length }} endpoints
{% end %} {% block api_main %}
{# Dense endpoint index #} {% if eps | length > 0 %}

Endpoints

{% for ep in eps %} {% end %}
Method Endpoint Description
{% spaceless %} {{ ep.method }} {% end %} {{ ep.path | highlight_path_params | safe }} {% if ep.deprecated %} Deprecated {% end %} {{ ep.summary | truncate(100) }}
{# Full operation reference, rendered inline in consolidated mode. #}
{% for ep in eps %} {% let operation_id = ep.anchor_id %} {% let path_params = ep.parameters |> where('location', 'path') %} {% let query_params = ep.parameters |> where('location', 'query') %} {% let header_params = ep.parameters |> where('location', 'header') %} {% let cookie_params = ep.parameters |> where('location', 'cookie') %}
{{ ep.method }} {{ ep.path | highlight_path_params | safe }}

{{ ep.summary or ep.path }}

{% if ep.deprecated %} Deprecated {% end %}
{% if ep.description and ep.description != ep.summary %}
{{ ep.description | markdownify | safe }}
{% end %}
{% if ep.parameters | length > 0 %}

Parameters

{% if path_params | length > 0 %}

{{ icon('link', size=14) }} Path

{% for p in path_params %} {% let param = p %} {% include 'autodoc/openapi/partials/param-row.html' %} {% end %}
{% end %} {% if query_params | length > 0 %}

{{ icon('filter', size=14) }} Query

{% for p in query_params %} {% let param = p %} {% include 'autodoc/openapi/partials/param-row.html' %} {% end %}
{% end %} {% if header_params | length > 0 %}

{{ icon('file-text', size=14) }} Headers

{% for p in header_params %} {% let param = p %} {% include 'autodoc/openapi/partials/param-row.html' %} {% end %}
{% end %} {% if cookie_params | length > 0 %}

{{ icon('disc', size=14) }} Cookies

{% for p in cookie_params %} {% let param = p %} {% include 'autodoc/openapi/partials/param-row.html' %} {% end %}
{% end %}
{% end %} {% with ep.request_body as req_body %} {% let request_body = req_body %} {% include 'autodoc/openapi/partials/request-body.html' %} {% end %} {% if ep.responses | length > 0 %} {% let responses = ep.responses %} {% let response_scope_id = operation_id %} {% include 'autodoc/openapi/partials/responses.html' %} {% end %} {% if ep.security | length > 0 %}

{{ icon('lock', size=18) }} Authorization

{% for scheme in ep.security %} {{ icon('key', size=12) }} {{ scheme }} {% end %}
{% end %}
{% end %}
{% else %} {# Empty State #}
{{ icon('inbox', size=48, class='autodoc-empty-state-icon') }}

No endpoints in this category

{% end %}
{% end %} {% block api_right %}

{{ icon('list', size=14) }} Catalog

{{ eps | length }} endpoint{% if eps | length != 1 %}s{% end %} in this resource group.

Back to API overview
{% end %}