Updated spec file
This commit is contained in:
parent
175acd2e14
commit
eb2528b139
15
app/app.php
15
app/app.php
|
@ -606,6 +606,17 @@ $utopia->get('/v1/open-api-2.json')
|
|||
];
|
||||
|
||||
if ($extensions) {
|
||||
$platformList = $route->getLabel('sdk.platform', []);
|
||||
|
||||
if(in_array(APP_PLATFORM_CLIENT, $platformList)) {
|
||||
$platformList = array_merge($platformList, [
|
||||
APP_PLATFORM_WEB,
|
||||
APP_PLATFORM_IOS,
|
||||
APP_PLATFORM_ANDROID,
|
||||
APP_PLATFORM_FLUTTER,
|
||||
]);
|
||||
}
|
||||
|
||||
$temp['extensions'] = [
|
||||
'weight' => $route->getOrder(),
|
||||
'cookies' => $route->getLabel('sdk.cookies', false),
|
||||
|
@ -615,6 +626,7 @@ $utopia->get('/v1/open-api-2.json')
|
|||
'rate-limit' => $route->getLabel('abuse-limit', 0),
|
||||
'rate-time' => $route->getLabel('abuse-time', 3600),
|
||||
'scope' => $route->getLabel('scope', ''),
|
||||
'platforms' => $platformList,
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -664,8 +676,9 @@ $utopia->get('/v1/open-api-2.json')
|
|||
break;
|
||||
case 'Utopia\Validator\JSON':
|
||||
case 'Utopia\Validator\Mock':
|
||||
case 'Utopia\Validator\Assoc':
|
||||
$node['type'] = 'object';
|
||||
$node['type'] = 'object';
|
||||
$node['type'] = 'string';
|
||||
$node['x-example'] = '{}';
|
||||
//$node['format'] = 'json';
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue