Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion openapi_spec_validator/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def __init__(self, instance_resolver):

def __call__(self, func):
def wrapped(validator, schema_element, instance, schema):
if not isinstance(instance, dict) or '$ref' not in instance:
if (not isinstance(instance, dict) or '$ref' not in instance
or not instance['$ref'].__hash__):
for res in func(validator, schema_element, instance, schema):
yield res
return
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/data/v3.0/petstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ components:
type: string
tag:
type: string
$ref:
type: string
Pets:
type: array
items:
Expand Down