Skip to content

Commit 58ae394

Browse files
committed
chore: update according to new specs
1 parent 8d63161 commit 58ae394

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Spec/Swagger2.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ protected function parseMethod(string $methodName, string $pathName, array $meth
176176
'consumes' => $method['consumes'] ?? [],
177177
'cookies' => $method['x-appwrite']['cookies'] ?? false,
178178
'type' => $method['x-appwrite']['type'] ?? false,
179+
'deprecated' => $method['deprecated'] ?? false,
179180
'headers' => [],
180181
'parameters' => [
181182
'all' => [],
@@ -188,12 +189,9 @@ protected function parseMethod(string $methodName, string $pathName, array $meth
188189
'responseModel' => $responseModel,
189190
];
190191

191-
if (($method['x-appwrite']['deprecated'] ?? false) !== false) {
192-
$output['deprecated'] = true;
193-
if (is_array($method['x-appwrite']['deprecated'])) {
194-
$output['since'] = $method['x-appwrite']['deprecated']['since'] ?? '';
195-
$output['replaceWith'] = $method['x-appwrite']['deprecated']['replaceWith'] ?? '';
196-
}
192+
if ($method['x-appwrite']['deprecated'] ?? false) {
193+
$output['since'] = $method['x-appwrite']['deprecated']['since'] ?? '';
194+
$output['replaceWith'] = $method['x-appwrite']['deprecated']['replaceWith'] ?? '';
197195
}
198196

199197
if ($output['type'] == 'graphql') {

0 commit comments

Comments
 (0)