diff --git a/ogc/bblocks/util.py b/ogc/bblocks/util.py index c49ee71..74da9a9 100644 --- a/ogc/bblocks/util.py +++ b/ogc/bblocks/util.py @@ -340,7 +340,10 @@ def walk_schema(schema): ref = schema.get(BBLOCKS_REF_ANNOTATION, schema.get('$ref')) if isinstance(ref, str): ref = re.sub(r'#.*$', '', ref) - if ref.startswith('bblocks://'): + if ref == f"bblocks://{bblock.identifier}": + # A self-reference is not a dependency + pass + elif ref.startswith('bblocks://'): # Get id directly from bblocks:// URI deps.add(ref[len('bblocks://'):]) elif ref in self.imported_bblock_schemas: