semantic-conventions/templates/registry/markdown/resource_macros.j2

16 lines
549 B
Django/Jinja

{#- Macros for simplifying creating "Resource" documentation. -#}
{% import 'stability.j2' as stability %}
{% macro real_stability(resource) %}
{% if resource.attributes | map(attribute='stability') | unique | length > 1 -%}
{{ stability.badge("mixed", "", "") }}
{%- else -%}
{{ stability.badge(resource.stability, resource.deprecated, resource.brief) }}
{%- endif %}
{% endmacro %}
{% macro header(resource) %}
**Status:** {{ real_stability(resource) | trim }}
**type:** `{{ resource.name }}`
**Description:** {{ resource.brief }}
{% endmacro %}