We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ae92bf commit 56b09b8Copy full SHA for 56b09b8
referencing/jsonschema.py
@@ -186,9 +186,9 @@ def id_of(self, resource):
186
return id
187
188
def anchors_in(self, resource):
189
- anchor = self.id_of(resource) or ""
190
- if anchor.startswith("#"):
191
- yield Anchor(name=anchor[1:], resource=resource)
+ id = resource.get("id")
+ if id is not None and id.startswith("#"):
+ yield Anchor(name=id[1:], resource=resource)
192
193
def subresources_of(self, resource):
194
for each in self._SUBRESOURCE:
0 commit comments