Skip to content

Commit

Permalink
replace required by requirementlevel (#3103)
Browse files Browse the repository at this point in the history
  • Loading branch information
Petrie committed Aug 22, 2022
1 parent b9adb17 commit 8c3a85a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions semconv/template.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ Type: {{ attr.attr_type }}
{%- else %}
Type: Enum
{%- endif %}
{%- if attr.required == Required.ALWAYS %}
Required: Always
{%- elif attr.required == Required.CONDITIONAL %}
Required: {{ attr.required_msg }}
{%- if attr.requirement_level == RequirementLevel.REQUIRED %}
RequirementLevel: Required
{%- elif attr.requirement_level == RequirementLevel.CONDITIONALLY_REQUIRED %}
RequirementLevel: ConditionallyRequired
{%- if attr.requirement_level_msg != "" %} ({{ attr.requirement_level_msg }}){%- endif %}
{%- elif attr.requirement_level == RequirementLevel.RECOMMENDED %}
RequirementLevel: Recommended
{%- if attr.requirement_level_msg != "" %} ({{ attr.requirement_level_msg }}){%- endif %}
{%- else %}
Required: No
RequirementLevel: Optional
{%- endif %}
{{ attr.stability | replace("Level.", ": ") | capitalize }}
{%- if attr.deprecated != None %}
Expand Down

0 comments on commit 8c3a85a

Please sign in to comment.