Skip to content

Commit

Permalink
openapi - reference recursion fix
Browse files Browse the repository at this point in the history
  • Loading branch information
commonism committed Dec 7, 2023
1 parent 2bf3d2b commit 8e2c2b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aiopenapi3/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,8 @@ def resolve_jr(self, root: RootBase, obj, value: Reference):
returned node is a unresolved reference
resolve & retry
"""
r._target = root.resolve_jp(r.ref)
if isinstance(r._target, ReferenceBase) and r.ref == r._target.ref:
v = root.resolve_jp(r.ref)
if not isinstance(v, ReferenceBase) or v.ref == r.ref:
return r
continue
return r
Expand Down

0 comments on commit 8e2c2b1

Please sign in to comment.