-
Notifications
You must be signed in to change notification settings - Fork 60
/
event_docs.md.j2
70 lines (57 loc) · 2.69 KB
/
event_docs.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!---
This file was generated from {{ source_file }}.
See that file for a copyright notice.
--->
# {{ type }} ({{ abbrev }})
{%- if version.startswith('0.') %}
> :warning: This event type is currently at version {{ version }} and is therefore experimental. Until it has reached version 1.0.0 it may undergo any number of backwards incompatible changes. It might also be deprecated and never reach 1.0.0.
{%- endif %}
{{ description }}
## Data Members
{%- for field, field_data in data_members.items() %}
{{ field | member_heading}}
__Type:__ {{ field_data.typ }}
{% if field_data.format -%}
__Format:__ {{ field_data.format }}
{% endif -%}
__Required:__ {{ field_data.required | yes_or_no }}
{% if field_data.legal_values -%}
__Legal values:__ {% for value in field_data.legal_values %}{{ value }}{{ ", " if not loop.last else "" }}{% endfor %}
{% endif -%}
__Description:__ {{ field_data.description }}
{%- endfor %}
## Links
This section describes which link types are valid for this event type. For details on how to express the link objects themselves see [The Links Object](../eiffel-syntax-and-usage/the-links-object.md).
{%- for link_type, link_data in links.items() %}
### {{ link_type }}
__Required:__ {{ link_data.required | yes_or_no }}
__Legal targets:__ {% if link_data.targets.any_type %}Any{% else %}{% for target_type in link_data.targets.types %}{{ target_type | event_link }}{{ ", " if not loop.last else "" }}{% endfor %}{% endif %}
__Multiple allowed:__ {{ link_data.multiple | yes_or_no }}
__Description:__ {{ link_data.description }}{% if link_data.experimental %} This link type targets an experimental event and may be removed in a future version of this event (see [Versioning](../eiffel-syntax-and-usage/versioning.md) for details).{% endif %}
{%- endfor %}
## Meta Members
{%- for field, field_data in meta_members.items() %}
{{ field | member_heading}}
__Type:__ {{ field_data.typ }}
{% if field_data.format -%}
__Format:__ {{ field_data.format }}
{% endif -%}
__Required:__ {{ field_data.required | yes_or_no }}
__Description:__ {{ field_data.description }}
{%- endfor %}
## Version History
| Version | Introduced in | Changes |
| ------- | ------------- | ------- |
{% for item in history %}
{%- if item.introduced_in is defined -%}
| {{ item.version }} | [{{ item.introduced_in }}](../../../tree/{{ item.introduced_in }}) | {{ item.changes }} |
{% else -%}
| {{ item.version }} | Not yet released in an edition | {{ item.changes }} |
{% endif -%}
{% endfor %}
{#- Putting a "-" after the for loop will kill all whitespaces afterwards -#}
{#- "-" in Jinja removes all whitespace thus this ugly hack #}
## Examples
{% for ex in examples -%}
* [{{ ex.title }}]({{ ex.url }})
{% endfor %}