From f02dde1ad2dea8fe62e6f60f08892f97d7e06dc0 Mon Sep 17 00:00:00 2001 From: Sujay Patil Date: Wed, 18 Dec 2024 15:22:32 -0800 Subject: [PATCH] fix Mappings table in web documentation pages --- src/doc-templates/common_metadata.md.jinja2 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/doc-templates/common_metadata.md.jinja2 b/src/doc-templates/common_metadata.md.jinja2 index 80dd87807f..efbd752ef3 100644 --- a/src/doc-templates/common_metadata.md.jinja2 +++ b/src/doc-templates/common_metadata.md.jinja2 @@ -82,9 +82,14 @@ Instances of this class *should* have identifiers with one of the following pref | Mapping Type | Mapped Value | | --- | --- | -{% for m, mt in schemaview.get_mappings(element.name).items() -%} +{% set native_mappings = schemaview.get_mappings(element.name).get('native', []) %} +{%- for m, mt in schemaview.get_mappings(element.name).items() -%} {% if mt|length > 0 -%} -| {{ m }} | {{ mt|join(', ') }} | + {% set display_key = 'mappings' if m == 'undefined' else m -%} + {% set filtered_mt = mt | reject('in', native_mappings) | list -%} + {% if filtered_mt|length > 0 -%} +| {{ display_key }} | {{ filtered_mt|join(', ') }} | + {% endif -%} {% endif -%} {% endfor %}