Skip to content

Commit

Permalink
Merge pull request #792 from swagger-api/Tesan3010-fix_issue10522
Browse files Browse the repository at this point in the history
Tesan3010 fix issue10522
  • Loading branch information
HugoMario authored Nov 4, 2020
2 parents b14abd2 + ba88fb2 commit b426101
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/resources/handlebars/swift5/modelObject.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public struct {{classname}}: Codable {
{{/allVars}}

{{#hasVars}}
public init({{#allVars}}{{name}}: {{{datatypeWithEnum}}}{{^required}}?{{/required}}{{#hasMore}}, {{/hasMore}}{{/allVars}}) {
public init({{#allVars}}{{name}}: {{{datatypeWithEnum}}}{{^required}}? = nil{{/required}}{{#hasMore}}, {{/hasMore}}{{/allVars}}) {
{{#allVars}}
self.{{name}} = {{name}}
{{/allVars}}
Expand Down Expand Up @@ -84,4 +84,3 @@ public struct {{classname}}: Codable {
{{/vendorExtensions.x-codegen-has-escaped-property-names}}{{/additionalPropertiesType}}

}

0 comments on commit b426101

Please sign in to comment.