Skip to content

Commit

Permalink
Improve Responses resolving references
Browse files Browse the repository at this point in the history
fixes #119
  • Loading branch information
cebe committed Feb 9, 2022
1 parent 39b7cac commit a02f958
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/spec/Responses.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ public function resolveReferences(ReferenceContext $context = null)
/** @var Response|Reference|null $referencedObject */
$referencedObject = $response->resolve($context);
$this->_responses[$key] = $referencedObject;
if (!$referencedObject instanceof Reference && $referencedObject !== null) {
if (!$referencedObject instanceof Reference && $referencedObject instanceof SpecObjectInterface) {
$referencedObject->resolveReferences();
}
} else {
} elseif ($response instanceof SpecObjectInterface) {
$response->resolveReferences($context);
}
}
Expand Down

0 comments on commit a02f958

Please sign in to comment.