diff --git a/hdr_schemata/utils/create_markdown.py b/hdr_schemata/utils/create_markdown.py index d7f68f7..a0c9ebe 100644 --- a/hdr_schemata/utils/create_markdown.py +++ b/hdr_schemata/utils/create_markdown.py @@ -175,12 +175,10 @@ def form_structure(data, form, parent=None): _ = item.pop("type") if isinstance(infos, list): + # Skip fields where the type is a pydantic type we have defined e.g. "Organisation" + # because we drill down into the subtypes instead if len(infos) == 0: continue - # # Skip fields where the type is a pydantic type we have defined e.g. "Organisation" - # # because we drill down into the subtypes instead - # elif isinstance(infos[0], str) and infos[0].lower() == k.split(".")[-1]: - # continue else: item["types"] = infos[0] else: @@ -228,7 +226,7 @@ def remove_types(data): from hdr_schemata.models.GWDM.v1_2 import Gwdm12 -reate_markdown(Hdruk220, "./docs/HDRUK/", "2.2.0") +create_markdown(Hdruk220, "./docs/HDRUK/", "2.2.0") create_markdown(Hdruk221, "./docs/HDRUK/", "2.2.1") create_markdown(Hdruk212, "./docs/HDRUK/", "2.1.2") create_markdown(Hdruk213, "./docs/HDRUK/", "2.1.3")