1
0
Fork 0
mirror of synced 2024-05-20 12:42:39 +12:00

Support for empty response

This commit is contained in:
Eldad Fux 2020-11-12 07:12:40 +02:00
parent 5b06f4d71d
commit fdc2a55f38

View file

@ -149,6 +149,11 @@ class Swagger2 extends Format
];
}
if($route->getLabel('sdk.response.code', 500) === 204) {
$temp['responses'][(string)$route->getLabel('sdk.response.code', '500')]['description'] = 'No content';
unset($temp['responses'][(string)$route->getLabel('sdk.response.code', '500')]['schema']);
}
if ((!empty($scope))) { // && 'public' != $scope
$temp['security'][] = $route->getLabel('sdk.security', $this->security);
}