Skip to content

Commit

Permalink
[swift5] fix warning (OpenAPITools#5900)
Browse files Browse the repository at this point in the history
  • Loading branch information
4brunu authored and michaelpro1 committed May 7, 2020
1 parent d2f88bc commit 0367754
Show file tree
Hide file tree
Showing 52 changed files with 74 additions and 124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ protocol JSONEncodable {
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} convenience init(response: HTTPURLResponse, body: T?) {
let rawHeader = response.allHeaderFields
var header = [String:String]()
for case let (key, value) as (String, String) in rawHeader {
header[key] = value
for (key, value) in rawHeader {
if let key = key as? String, let value = value as? String {
header[key] = value
}
}
self.init(statusCode: response.statusCode, header: header, body: body)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
Expand Down Expand Up @@ -569,7 +568,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ open class Response<T> {
public convenience init(response: HTTPURLResponse, body: T?) {
let rawHeader = response.allHeaderFields
var header = [String: String]()
for case let (key, value) as (String, String) in rawHeader {
header[key] = value
for (key, value) in rawHeader {
if let key = key as? String, let value = value as? String {
header[key] = value
}
}
self.init(statusCode: response.statusCode, header: header, body: body)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
Expand Down Expand Up @@ -521,7 +520,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ open class Response<T> {
public convenience init(response: HTTPURLResponse, body: T?) {
let rawHeader = response.allHeaderFields
var header = [String: String]()
for case let (key, value) as (String, String) in rawHeader {
header[key] = value
for (key, value) in rawHeader {
if let key = key as? String, let value = value as? String {
header[key] = value
}
}
self.init(statusCode: response.statusCode, header: header, body: body)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
Expand Down Expand Up @@ -521,7 +520,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ open class Response<T> {
public convenience init(response: HTTPURLResponse, body: T?) {
let rawHeader = response.allHeaderFields
var header = [String: String]()
for case let (key, value) as (String, String) in rawHeader {
header[key] = value
for (key, value) in rawHeader {
if let key = key as? String, let value = value as? String {
header[key] = value
}
}
self.init(statusCode: response.statusCode, header: header, body: body)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
Expand Down Expand Up @@ -521,7 +520,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ internal class Response<T> {
internal convenience init(response: HTTPURLResponse, body: T?) {
let rawHeader = response.allHeaderFields
var header = [String: String]()
for case let (key, value) as (String, String) in rawHeader {
header[key] = value
for (key, value) in rawHeader {
if let key = key as? String, let value = value as? String {
header[key] = value
}
}
self.init(statusCode: response.statusCode, header: header, body: body)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
Expand Down Expand Up @@ -521,7 +520,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ open class Response<T> {
public convenience init(response: HTTPURLResponse, body: T?) {
let rawHeader = response.allHeaderFields
var header = [String: String]()
for case let (key, value) as (String, String) in rawHeader {
header[key] = value
for (key, value) in rawHeader {
if let key = key as? String, let value = value as? String {
header[key] = value
}
}
self.init(statusCode: response.statusCode, header: header, body: body)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
Expand Down Expand Up @@ -569,7 +568,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ open class Response<T> {
public convenience init(response: HTTPURLResponse, body: T?) {
let rawHeader = response.allHeaderFields
var header = [String: String]()
for case let (key, value) as (String, String) in rawHeader {
header[key] = value
for (key, value) in rawHeader {
if let key = key as? String, let value = value as? String {
header[key] = value
}
}
self.init(statusCode: response.statusCode, header: header, body: body)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT
Loading

0 comments on commit 0367754

Please sign in to comment.