mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
feat: global attributes in specs
This commit is contained in:
1 parent
fa0af50d02
commit
3cdeeac964
16 files changed
+28
-12
No files matched your search
@@ -263,6 +263,12 @@ class OpenAPI3 extends Format
|
||||
'required' => !$param['optional'],
|
||||
];
|
||||
|
||||
foreach ($this->services as $service) {
|
||||
if ($route->getLabel('sdk.namespace', 'default') === $service['name'] && in_array($name, $service['x-globalAttributes'] ?? [])) {
|
||||
$node['x-global'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
switch ((!empty($validator)) ? \get_class($validator) : '') {
|
||||
case 'Utopia\Validator\Text':
|
||||
$node['schema']['type'] = $validator->getType();
|
||||
|
||||
@@ -252,6 +252,12 @@ class Swagger2 extends Format
|
||||
'required' => !$param['optional'],
|
||||
];
|
||||
|
||||
foreach ($this->services as $service) {
|
||||
if ($route->getLabel('sdk.namespace', 'default') === $service['name'] && in_array($name, $service['x-globalAttributes'] ?? [])) {
|
||||
$node['x-global'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
switch ((!empty($validator)) ? \get_class($validator) : '') {
|
||||
case 'Utopia\Validator\Text':
|
||||
$node['type'] = $validator->getType();
|
||||
|
||||
Reference in new issue
Block a user