{# 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 ?? [] %} {% let schema_items = section | schemas %} {% block api_left %} {% end %} {% block api_header %} Reference section

{{ title }}

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

Categories

{% end %} {# Schema Catalog #} {% if schema_items | length > 0 %}

Schemas

{% if schema_items | length > 4 %}
{% end %}
{# Child Pages Grid (fallback for non-schema sections) #} {% elif 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 %} {% block api_right %}

{{ icon('folder', size=14) }} Section

Sections
{{ child_sections | length }}
Schemas
{{ schema_items | length }}
Items
{{ child_pages | length }}
{% end %}