-
Notifications
You must be signed in to change notification settings - Fork 141
/
attribute_namespace.md.j2
40 lines (33 loc) · 1.79 KB
/
attribute_namespace.md.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{#- This template is rendered per top-level registry namespace. -#}
{#- It consists of two variables: -#}
{#- - id: The top-level namespace id. -#}
{#- - groups: A sequence of all attribute groups under this namespace. -#}
{#- This includes deprecated groups. -#}
{% import 'stability.j2' as stability %}
{% import 'notes.j2' as notes %}
{% import 'enum_macros.j2' as enums %}
{% import 'attribute_macros.j2' as attrs %}
{%- set my_file_name = ctx.id | lower | kebab_case ~ ".md" -%}
{{- template.set_file_name(my_file_name) -}}
<!--- Hugo front matter used to generate the website version of this page:
--->
<!-- NOTE: THIS FILE IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/attribute_namespace.md.j2 -->
# {{ ctx.id | title_case | acronym }}
{% if ctx.groups | length > 1 %}{% for group in ctx.groups | sort(attribute="id") %}
{%- set group_name = group.id | split_id | list | reject("eq", "registry") | join(" ") -%}
- [{{ group_name | title_case }}](#{{group_name | kebab_case }}-attributes)
{% endfor %}{% endif %}
{% for group in ctx.groups | sort(attribute="id") %}
## {{ group.id | split_id | list | reject("eq", "registry") | join(" ") | title_case | acronym }} Attributes
{{ group.brief }}
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
{%- for attribute in group.attributes | sort(attribute="name") %}
| {{ attrs.name(attribute) }} | {{ attrs.type(attribute) }} | {{ attribute.brief | trim }}{{ notes.add(attribute.note) }} | {{ attrs.examples(attribute) | trim }} | {{ stability.badge(attribute.stability, attribute.deprecated) | trim }} |
{%- endfor %}
{{ notes.render() }}
{% for enum in group.attributes | sort(attribute="name") %}
{%- if enum.type is mapping -%}{{ enums.table(enum, notes) }}{% endif %}
{%- endfor -%}
{%- endfor -%}