From 409e8ba646eaaf4c2947f0dd3874d4d546d54fb8 Mon Sep 17 00:00:00 2001 From: Nico Matentzoglu Date: Mon, 6 Jan 2025 09:09:25 +0200 Subject: [PATCH] Make sure docgen uses induced slots Before, slot information was taken outside the context of a specific class (not induced), which led to wrong rendering in the docs. --- src/doc-templates/index.md.jinja2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc-templates/index.md.jinja2 b/src/doc-templates/index.md.jinja2 index c6fd8704..1318fca1 100644 --- a/src/doc-templates/index.md.jinja2 +++ b/src/doc-templates/index.md.jinja2 @@ -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 %} @@ -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 %}