Skip to content

Commit fd9cb4b

Browse files
committed
Merge branch 'master' of https://github.com/appwrite/sdk-generator into feat-kmp-sdk
2 parents 9c5993f + 09bc721 commit fd9cb4b

File tree

39 files changed

+401
-344
lines changed

39 files changed

+401
-344
lines changed

composer.lock

Lines changed: 32 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/SDK/Language/Swift.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ public function getFiles(): array
299299
* @param array $parameter
300300
* @return string
301301
*/
302-
public function getTypeName(array $parameter, array $spec = []): string
302+
public function getTypeName(array $parameter, array $spec = [], bool $isProperty = false): string
303303
{
304304
if (isset($parameter['enumName'])) {
305305
return ($spec['title'] ?? '') . 'Enums.' . \ucfirst($parameter['enumName']);
@@ -319,8 +319,8 @@ public function getTypeName(array $parameter, array $spec = []): string
319319
self::TYPE_BOOLEAN => 'Bool',
320320
self::TYPE_ARRAY => (!empty(($parameter['array'] ?? [])['type']) && !\is_array($parameter['array']['type']))
321321
? '[' . $this->getTypeName($parameter['array']) . ']'
322-
: '[Any]',
323-
self::TYPE_OBJECT => 'Any',
322+
: '[AnyCodable]',
323+
self::TYPE_OBJECT => $isProperty ? '[String: AnyCodable]' : 'Any',
324324
default => $parameter['type'],
325325
};
326326
}
@@ -527,7 +527,7 @@ protected function getPropertyType(array $property, array $spec, string $generic
527527
$type = '[' . $type . ']';
528528
}
529529
} else {
530-
$type = $this->getTypeName($property);
530+
$type = $this->getTypeName($property, isProperty: true);
531531
}
532532

533533
return $type;

0 commit comments

Comments
 (0)