Skip to content

Commit

Permalink
Shorten @Index and @type (not only @id) curies
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Jun 17, 2024
1 parent f4232fd commit a96caca
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ogc/na/annotate_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a96caca

Please sign in to comment.