From a96caca7a06fb99055d985c19052ecfe4e15105f Mon Sep 17 00:00:00 2001 From: Alejandro Villar Date: Mon, 17 Jun 2024 20:27:22 +0200 Subject: [PATCH] Shorten @index and @type (not only @id) curies --- ogc/na/annotate_schema.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ogc/na/annotate_schema.py b/ogc/na/annotate_schema.py index 4cc69ec..00423d7 100644 --- a/ogc/na/annotate_schema.py +++ b/ogc/na/annotate_schema.py @@ -873,8 +873,9 @@ def compact_uris(branch, context_stack=None): if isinstance(term_value, str): branch[term] = compact_uri(term_value) elif isinstance(term_value, dict): - if '@id' in term_value: - term_value['@id'] = compact_uri(term_value['@id']) + for k in CURIE_TERMS: + if k in term_value: + term_value[k] = compact_uri(term_value[k]) if len(term_value) == 1 and '@id' in term_value: branch[term] = term_value['@id'] elif '@context' in term_value: