diff --git a/README.md b/README.md index a61506999..0cd3191a9 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,9 @@ It currently consists of # Release Notes BOAT is still under development and subject to change. +## 0.17.74 +* Swift5: Removed deprecated initializer from model objects. The initializer is now internal and only accessible through the Builder pattern, preventing breaking code from deprecation warnings. + ## 0.17.73 Added code related to generate webhook endpoints with different goal To add prehook and posthook request mappings for all the requests in spec yaml using webhooks. diff --git a/boat-scaffold/src/main/templates/boat-swift5/modelObject.mustache b/boat-scaffold/src/main/templates/boat-swift5/modelObject.mustache index b279ed134..725d44d0a 100644 --- a/boat-scaffold/src/main/templates/boat-swift5/modelObject.mustache +++ b/boat-scaffold/src/main/templates/boat-swift5/modelObject.mustache @@ -25,8 +25,7 @@ {{/allVars}} {{#hasVars}} - @available(*, deprecated, message: "This initializer is deprecated, use the initializer and the setters of {{classname}}.Builder class.") - {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} init({{#allVars}}{{name}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}? = nil{{/isNullable}}{{/required}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allVars}}) { + internal init({{#allVars}}{{name}}: {{{datatypeWithEnum}}}{{#required}}{{#isNullable}}? = nil{{/isNullable}}{{/required}}{{^required}}? = nil{{/required}}{{^-last}}, {{/-last}}{{/allVars}}) { {{#allVars}} self.{{name}} = {{name}} {{/allVars}}