From a02f958b56e29e29cf6d8df52de4fc65e61f1e7d Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Wed, 9 Feb 2022 13:36:31 +0100 Subject: [PATCH] Improve Responses resolving references fixes #119 --- src/spec/Responses.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/spec/Responses.php b/src/spec/Responses.php index 5247603..a3623ae 100644 --- a/src/spec/Responses.php +++ b/src/spec/Responses.php @@ -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); } }