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