We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f12532 commit 5da020aCopy full SHA for 5da020a
templates/swift/Sources/Models/Model.swift.twig
@@ -9,7 +9,7 @@ public class {{ definition | modelType(spec) | raw }} {
9
10
{%~ for property in definition.properties %}
11
/// {{ property.description }}
12
- public let {{ property.name | escapeSwiftKeyword | removeDollarSign }}: {{ property | propertyType(spec) | raw }}
+ public let {{ property.name | escapeSwiftKeyword | removeDollarSign }}: {{ property | propertyType(spec) | raw }}{% if not property.required %}?{% endif %}
13
14
15
{%~ endfor %}
0 commit comments