Skip to content

Commit

Permalink
Do not process $defs/definitions when building contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Jul 23, 2024
1 parent 2f58a48 commit 412d453
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions ogc/na/annotate_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,15 +772,6 @@ def process_subschema(subschema: dict, from_schema: ReferencedSchema, onto_conte
if isinstance(pp, dict):
process_subschema(pp, from_schema, onto_context, schema_path + [pp_k])

for p in ('definitions', '$defs'):
defs = subschema.get(p)
if defs and isinstance(defs, dict):
for entry_key, entry in defs.items():
def_path = schema_path + [entry_key]
def_path_str = f"{from_schema.location}#{'/'.join(def_path)}"
if def_path_str not in processed_refs:
process_subschema(entry, from_schema, onto_context, def_path)

if ANNOTATION_EXTRA_TERMS in subschema:
for extra_term, extra_term_context in subschema[ANNOTATION_EXTRA_TERMS].items():
if extra_term not in onto_context:
Expand Down

0 comments on commit 412d453

Please sign in to comment.