Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render Mappings section generally on all element documentation pages #2087

Merged
merged 4 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_pages_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
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 -%}
Loading