From 8c3a85a5bee7bd2b30146937400436960e1e3e2a Mon Sep 17 00:00:00 2001 From: Dafei Liu Date: Tue, 23 Aug 2022 00:47:11 +0800 Subject: [PATCH] replace `required` by `requirementlevel` (#3103) --- semconv/template.j2 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/semconv/template.j2 b/semconv/template.j2 index b9ce5c591f0..1d51bddb2bf 100644 --- a/semconv/template.j2 +++ b/semconv/template.j2 @@ -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 %}