{#-
OpenAPI Schema Template

Template for data model/schema documentation.
Provides detailed information about API data structures.
-#}

{% extends "base/openapi_base.md.jinja2" %}

{% from 'macros/safe_macros.md.jinja2' import safe_section %}

{% block doc_type %}api-schema{% endblock %}

{% block badges %}
:::{badge} Data Schema
:class: badge-info
:::

{% if element.metadata.type %}
:::{badge} {{ element.metadata.type | title }}
:class: badge-secondary
:::
{% endif %}
{% endblock %}

{% block content %}
{#- Schema description -#}
{% call safe_section("description") %}
  {% include 'openapi/partials/schema_description.md.jinja2' %}
{% endcall %}

{#- Schema properties -#}
{% call safe_section("properties") %}
  {% include 'openapi/partials/schema_properties.md.jinja2' %}
{% endcall %}

{#- Schema examples -#}
{% call safe_section("examples") %}
  {% include 'openapi/partials/schema_examples.md.jinja2' %}
{% endcall %}

{#- Related schemas -#}
{% call safe_section("related") %}
  {% include 'openapi/partials/related_schemas.md.jinja2' %}
{% endcall %}
{% endblock %}
