Skip to content

Commit

Permalink
Fix OAS 3.0 build
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Jan 22, 2024
1 parent 7f45b23 commit 8b8a6b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ogc/bblocks/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,8 +788,10 @@ def walk(subschema: dict | list, schema_id: str | Path, is_properties: bool = Fa
apply_fixes(subschema)

schema_version = subschema.pop('$schema', None)
schema_id = subschema.pop('$id', schema_id)
if isinstance(schema_id, str) and isinstance(subschema.get('$ref'), str):
schema_declared_id = subschema.pop('$id', None)
if schema_declared_id:
schema_id = schema_declared_id
if isinstance(schema_id, (str, Path)) and isinstance(subschema.get('$ref'), str):

ref = f"{schema_url}#/x-defs/{get_ref_mapping(schema_id, subschema.pop('$ref'))}"

Expand Down

0 comments on commit 8b8a6b3

Please sign in to comment.