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.
nil
Swift5
Swift4
1 parent 45812fd commit 2e618e7Copy full SHA for 2e618e7
src/main/resources/handlebars/swift5/modelObject.mustache
@@ -25,7 +25,7 @@ public struct {{classname}}: Codable {
25
{{/allVars}}
26
27
{{#hasVars}}
28
- public init({{#allVars}}{{name}}: {{{datatypeWithEnum}}}{{^required}}?{{/required}}{{#hasMore}}, {{/hasMore}}{{/allVars}}) {
+ public init({{#allVars}}{{name}}: {{{datatypeWithEnum}}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allVars}}) {
29
{{#allVars}}
30
self.{{name}} = {{name}}
31
@@ -84,4 +84,3 @@ public struct {{classname}}: Codable {
84
{{/vendorExtensions.x-codegen-has-escaped-property-names}}{{/additionalPropertiesType}}
85
86
}
87
-
0 commit comments