mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
Merge pull request #2877 from appwrite/fix-spec-nested-maps
Fix spec nested map properties being overridden
This commit is contained in:
commit
e44587b3c9
1 changed files with 10 additions and 1 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue