Skip to content

Commit

Permalink
Merge pull request #2087 from microbiomedata/update-common-jinja
Browse files Browse the repository at this point in the history
Render `Mappings` section generally on all element documentation pages
  • Loading branch information
turbomam authored Dec 4, 2024
2 parents 07bdeda + ecd28fd commit 4da2595
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
14 changes: 0 additions & 14 deletions src/doc-templates/class.md.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,6 @@ URI: {{ gen.uri_link(element) }}

{% include "common_metadata.md.jinja2" %}


{% if schemaview.get_mappings(element.name).items() -%}
## Mappings

| Mapping Type | Mapped Value |
| --- | --- |
{% for m, mt in schemaview.get_mappings(element.name).items() -%}
{% if mt|length > 0 -%}
| {{ m }} | {{ mt|join(', ') }} |
{% endif -%}
{% endfor %}

{% endif -%}

{% if gen.example_object_blobs(element.name) -%}
## Examples
{% for name, blob in gen.example_object_blobs(element.name) -%}
Expand Down
15 changes: 14 additions & 1 deletion src/doc-templates/common_metadata.md.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,17 @@ Instances of this class *should* have identifiers with one of the following pref
{% if element.imported_from %}
* imported from: {{ element.imported_from }}
{% endif %}
{% endif %}
{% endif %}

{% if schemaview.get_mappings(element.name).items() -%}
## Mappings

| Mapping Type | Mapped Value |
| --- | --- |
{% for m, mt in schemaview.get_mappings(element.name).items() -%}
{% if mt|length > 0 -%}
| {{ m }} | {{ mt|join(', ') }} |
{% endif -%}
{% endfor %}

{% endif -%}

0 comments on commit 4da2595

Please sign in to comment.