[swift5] fix warning (#5900)

This commit is contained in:
Bruno Coelho 2020-04-13 09:57:22 +01:00 committed by GitHub
parent d8b46dc3d5
commit 7dd2d3c3eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
52 changed files with 74 additions and 124 deletions

View File

@ -45,9 +45,11 @@ 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 {
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)
}
}

View File

@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT

View File

@ -313,7 +313,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
@ -569,7 +568,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;

View File

@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:PetstoreClient.xcodeproj">
</FileRef>
</Workspace>

View File

@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"

View File

@ -44,9 +44,11 @@ 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 {
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)
}
}

View File

@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT

View File

@ -273,7 +273,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
@ -521,7 +520,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;

View File

@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:PetstoreClient.xcodeproj">
</FileRef>
</Workspace>

View File

@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"

View File

@ -44,9 +44,11 @@ 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 {
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)
}
}

View File

@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT

View File

@ -273,7 +273,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
@ -521,7 +520,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;

View File

@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:PetstoreClient.xcodeproj">
</FileRef>
</Workspace>

View File

@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"

View File

@ -44,9 +44,11 @@ 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 {
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)
}
}

View File

@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT

View File

@ -273,7 +273,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
@ -521,7 +520,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;

View File

@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:PetstoreClient.xcodeproj">
</FileRef>
</Workspace>

View File

@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"

View File

@ -44,9 +44,11 @@ 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 {
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)
}
}

View File

@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT

View File

@ -273,7 +273,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
@ -521,7 +520,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;

View File

@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:PetstoreClient.xcodeproj">
</FileRef>
</Workspace>

View File

@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"

View File

@ -44,9 +44,11 @@ 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 {
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)
}
}

View File

@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT

View File

@ -313,7 +313,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
@ -569,7 +568,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;

View File

@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:PetstoreClient.xcodeproj">
</FileRef>
</Workspace>

View File

@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"

View File

@ -44,9 +44,11 @@ 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 {
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)
}
}

View File

@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT

View File

@ -273,7 +273,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
@ -521,7 +520,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;

View File

@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:PetstoreClient.xcodeproj">
</FileRef>
</Workspace>

View File

@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"

View File

@ -44,9 +44,11 @@ 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 {
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)
}
}

View File

@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT

View File

@ -313,7 +313,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
@ -569,7 +568,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;

View File

@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:PetstoreClient.xcodeproj">
</FileRef>
</Workspace>

View File

@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"

View File

@ -44,9 +44,11 @@ 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 {
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)
}
}

View File

@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT

View File

@ -273,7 +273,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 5FBA6AE5F64CD737F88B4565;
@ -521,7 +520,7 @@
3B2C02AFB91CB5C82766ED5C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
ECAB17FF35111B5E14DAAC08 /* Build configuration list for PBXProject "PetstoreClient" */ = {
isa = XCConfigurationList;

View File

@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:PetstoreClient.xcodeproj">
</FileRef>
</Workspace>

View File

@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"

View File

@ -44,9 +44,11 @@ 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 {
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)
}
}

View File

@ -1 +1 @@
4.3.0-SNAPSHOT
4.3.1-SNAPSHOT

View File

@ -195,7 +195,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Base,
en,
);
mainGroup = 3049D31996790CF8E31B6F01;
@ -426,7 +425,7 @@
4CDAC84BFAB424A21776ADCA /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "";
defaultConfigurationName = Debug;
};
/* End XCConfigurationList section */
};

View File

@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:">
location = "self:TestClient.xcodeproj">
</FileRef>
</Workspace>

View File

@ -41,10 +41,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
<CodeCoverageTargets>
</CodeCoverageTargets>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
@ -67,8 +63,6 @@
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"

View File

@ -44,9 +44,11 @@ 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 {
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)
}
}

View File

@ -3,8 +3,6 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**baseClassStringProp** | **String** | | [optional]
**baseClassIntegerProp** | **Int** | | [optional]
**subClassStringProp** | **String** | | [optional]
**subClassIntegerProp** | **Int** | | [optional]