mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge pull request #2877 from appwrite/fix-spec-nested-maps
Fix spec nested map properties being overridden
This commit is contained in:
@@ -449,7 +449,6 @@ class Swagger2 extends Format
|
||||
|
||||
case 'json':
|
||||
$type = 'object';
|
||||
$output['definitions'][$model->getType()]['properties'][$name]['additionalProperties'] = true;
|
||||
break;
|
||||
|
||||
case 'integer':
|
||||
@@ -498,6 +497,16 @@ class Swagger2 extends Format
|
||||
break;
|
||||
}
|
||||
|
||||
if ($rule['type'] == 'json') {
|
||||
$output['definitions'][$model->getType()]['properties'][$name] = [
|
||||
'type' => $type,
|
||||
'additionalProperties' => true,
|
||||
'description' => $rule['description'] ?? '',
|
||||
'x-example' => $rule['example'] ?? null,
|
||||
];
|
||||
continue;
|
||||
}
|
||||
|
||||
if($rule['array']) {
|
||||
$output['definitions'][$model->getType()]['properties'][$name] = [
|
||||
'type' => 'array',
|
||||
|
||||
Reference in New Issue
Block a user