-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't render deprecated enum members in semconv tables (#1110)
- Loading branch information
Showing
3 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
change_type: enhancement | ||
|
||
component: other | ||
|
||
note: "Don't render deprecated enum members in semconv tables." | ||
|
||
issues: [1110] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
{% import 'stability.j2' as stability %} | ||
{% macro filter(member) %}{% if snippet_type is not defined or (member.deprecated is none or member.deprecated == "") %}{{ "True" }}{% else %}{{ "False" }}{% endif %}{% endmacro %} | ||
{% macro table(enum, notes) %} | ||
`{{enum.name}}` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used. | ||
|
||
| Value | Description | Stability | | ||
|---|---|---| | ||
{% for espec in enum.type.members | sort(attribute='value') %}| `{{ espec.value }}` | {{ (espec.brief or espec.id) | trim }}{{ notes.add(espec.note) }} | {{ stability.badge(espec.stability, espec.deprecated) }} | | ||
{% endfor %}{{ notes.render() }}{% endmacro %} | ||
{% for espec in enum.type.members | sort(attribute='value') %}{% if filter(espec) == "True" %}| `{{ espec.value }}` | {{ (espec.brief or espec.id) | trim }}{{ notes.add(espec.note) }} | {{ stability.badge(espec.stability, espec.deprecated) }} | | ||
{% endif %}{% endfor %}{{ notes.render() }}{% endmacro %} | ||
{% macro tables(enums, notes) %}{% for enum in enums | sort(attribute="name") %}{{ table(enum, notes) }} | ||
{% endfor %}{% endmacro %} |