Skip to content

Commit 3f12532

Browse files
Merge pull request #961 from appwrite/fix-swift-double-optional
Fix swift double optional
2 parents 6ee8749 + 378e607 commit 3f12532

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/swift/Sources/Models/Model.swift.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class {{ definition | modelType(spec) | raw }} {
99

1010
{%~ for property in definition.properties %}
1111
/// {{ property.description }}
12-
public let {{ property.name | escapeSwiftKeyword | removeDollarSign }}: {{ property | propertyType(spec) | raw }}{% if not property.required %}?{% endif %}
12+
public let {{ property.name | escapeSwiftKeyword | removeDollarSign }}: {{ property | propertyType(spec) | raw }}
1313

1414

1515
{%~ endfor %}
@@ -20,7 +20,7 @@ public class {{ definition | modelType(spec) | raw }} {
2020

2121
init(
2222
{%~ for property in definition.properties %}
23-
{{ property.name | escapeSwiftKeyword | removeDollarSign }}: {{ property | propertyType(spec) | raw }}{% if not property.required %}?{% endif %}{% if not loop.last or (loop.last and definition.additionalProperties) %},{% endif %}
23+
{{ property.name | escapeSwiftKeyword | removeDollarSign }}: {{ property | propertyType(spec) | raw }}{% if not loop.last or (loop.last and definition.additionalProperties) %},{% endif %}
2424

2525
{%~ endfor %}
2626
{%~ if definition.additionalProperties %}

0 commit comments

Comments
 (0)