{# Bengal OpenAPI Section Index Generic section index for OpenAPI documentation sections. Used for sections without consolidated endpoints (e.g., /schemas/). Context: - section: Section - site: Site - config: Config #} {% extends 'autodoc/openapi/layouts/reference.html' %} {% let title = section.title ?? 'API Section' %} {% let description = section.metadata.description ?? '' %} {# Get pages from the section - section.pages contains Page objects #} {% let child_pages = section.pages ?? [] %} {# Get subsections for navigation to child sections #} {% let child_sections = section.subsections ?? [] %} {% block header %}

{{ title }}

{% if description %}
{{ description | markdownify | safe }}
{% end %}
{% end %} {% block content %}
{# Child Sections Grid (e.g., tag groups) #} {% if child_sections %}

Categories

{% end %} {# Child Pages Grid (e.g., individual schemas) #} {% if child_pages %}

Items

{% for child in child_pages %} {# Skip the index page itself #} {% if child != section.index_page %}

{{ child.title }}

{% with child.metadata.description as desc %} {% if desc %}

{{ desc | truncate(120) }}

{% end %} {% end %}
{% end %} {% end %}
{% elif not child_sections %}

No items in this section.

{% end %}
{% end %}