We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 39b58f0 commit 5a19f2bCopy full SHA for 5a19f2b
src/Paths/PathItem/Operation/Responses.php
@@ -43,7 +43,13 @@ public function toArray(): array
43
$responses = [];
44
45
foreach ($this->getResponses() as $response) {
46
- $responses[$response->getCode()] = $response->toArray();
+ if ($response->hasRef()) {
47
+ $responses[$response->getCode()] = [
48
+ '$ref' => $response->getRef()
49
+ ];
50
+ } else {
51
+ $responses[$response->getCode()] = $response->toArray();
52
+ }
53
}
54
55
return $responses;
0 commit comments