Skip to content

Commit

Permalink
Make sure docgen uses induced slots
Browse files Browse the repository at this point in the history
Before, slot information was taken outside the context of a specific class (not induced), which led to wrong rendering in the docs.
  • Loading branch information
matentzn committed Jan 6, 2025
1 parent 551d641 commit 409e8ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc-templates/index.md.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ See [here](https://github.com/mapping-commons/sssom/tree/master/examples/schema)
| Column/Field | Description | Required |
|--------------------|---------------------------------------------------------|-------------|
{%- for slot in c.slots %}
{%- set slot_info = schemaview.get_slot(slot) %}
{%- set slot_info = schemaview.induced_slot(slot, c.name) %}
| **{{ gen.link(slot) }}** | {{ slot_info.description | default("No description") }} | {% if slot_info.required | default(false) %}Required{% elif slot_info.recommended | default(false) %}Recommended{% else %}Optional{% endif %} |
{%- endfor %}
{%- endif %}
Expand All @@ -65,7 +65,7 @@ See [here](https://github.com/mapping-commons/sssom/tree/master/examples/schema)
| Column/Field | Description | Required |
|--------------------|---------------------------------------------------------|-------------|
{%- for slot in c.slots %}
{%- set slot_info = schemaview.get_slot(slot) %}
{%- set slot_info = schemaview.induced_slot(slot, c.name) %}
| **{{ gen.link(slot) }}** | {{ slot_info.description | default("No description") }} | {% if slot_info.required | default(false) %}Required{% elif slot_info.recommended | default(false) %}Recommended{% else %}Optional{% endif %} |
{%- endfor %}
{%- endif %}
Expand Down

0 comments on commit 409e8ba

Please sign in to comment.