From f07b87bcb6edc018ee62e74096cbd26fa4307a95 Mon Sep 17 00:00:00 2001 From: raphaelgazzotti Date: Wed, 13 May 2026 14:04:50 +0200 Subject: [PATCH 1/2] Support for v5/latest. Fix #7 --- build.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.py b/build.py index e5e89b9d..3333f474 100644 --- a/build.py +++ b/build.py @@ -17,6 +17,7 @@ terms_as_enums = True licenses_as_enums = True content_types_as_enums = True +accessibilities_as_enums = True graph_structures_as_enums = True print("********************************************************") @@ -78,9 +79,11 @@ terms_as_enums and "controlled" in schema_file_path, licenses_as_enums and "license" in schema_file_path, content_types_as_enums and "contentType" in schema_file_path, + accessibilities_as_enums and "accessibility" in schema_file_path, graph_structures_as_enums and ( "parcellationEntity" in schema_file_path + or "commonCoordinateFramework" in schema_file_path or "commonCoordinateSpace" in schema_file_path ), ] From af61bceb38798bbedfd57c71d882449936a0e8f1 Mon Sep 17 00:00:00 2001 From: raphaelgazzotti Date: Wed, 13 May 2026 14:38:08 +0200 Subject: [PATCH 2/2] Handle instances without name or shortName. --- pipeline/translator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pipeline/translator.py b/pipeline/translator.py index 2d4935d9..f24bfa0f 100644 --- a/pipeline/translator.py +++ b/pipeline/translator.py @@ -280,7 +280,9 @@ def build_enum(instance): return enum def get_instance_name(instance): - return instance.get("name", instance.get("shortName")) + # Final fallback for special cases (e.g. the "Accessibility" library) + # where neither "name" nor "shortName" is available. + return instance.get("name", instance.get("shortName") or instance.get("@id").split("/")[-1]) instances_payload = self.instances[self._schema_payload["_type"]] self._translated_schema = {