| @@ 201-203 (lines=3) @@ | ||
| 198 | $data['components']['schemas'] = array_merge($this->definitions, $data['components']['schemas']); |
|
| 199 | } |
|
| 200 | ||
| 201 | if ($params['format'] === 'yaml') { |
|
| 202 | return new TextApiResponse(200, Yaml::dump($data, PHP_INT_MAX, 2, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE), 'text/plain'); |
|
| 203 | } |
|
| 204 | ||
| 205 | $data = array_merge_recursive($this->initData, $data); |
|
| 206 | return new JsonApiResponse(200, $data); |
|
| @@ 139-141 (lines=3) @@ | ||
| 136 | 'paths' => $this->getHandlersList($handlers, $baseUrl, $basePath), |
|
| 137 | ]; |
|
| 138 | ||
| 139 | if ($params['format'] === 'yaml') { |
|
| 140 | return new TextApiResponse(200, Yaml::dump($data, PHP_INT_MAX, 2, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE), 'text/plain'); |
|
| 141 | } |
|
| 142 | return new JsonApiResponse(200, $data); |
|
| 143 | } |
|
| 144 | ||