forked from loafle/openapi-generator-original
update swift samples, use swiftlint 0.41.0 (#8138)
This commit is contained in:
@@ -12,7 +12,7 @@ public struct Animal: Codable {
|
||||
public var className: String
|
||||
public var color: String? = "red"
|
||||
|
||||
public init(className: String, color: String? = nil) {
|
||||
public init(className: String, color: String? = "red") {
|
||||
self.className = className
|
||||
self.color = color
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Cat: Codable {
|
||||
public var color: String? = "red"
|
||||
public var declawed: Bool?
|
||||
|
||||
public init(className: String, color: String? = nil, declawed: Bool? = nil) {
|
||||
public init(className: String, color: String? = "red", declawed: Bool? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.declawed = declawed
|
||||
|
||||
@@ -12,7 +12,7 @@ public struct Category: Codable {
|
||||
public var id: Int64?
|
||||
public var name: String = "default-name"
|
||||
|
||||
public init(id: Int64? = nil, name: String) {
|
||||
public init(id: Int64? = nil, name: String = "default-name") {
|
||||
self.id = id
|
||||
self.name = name
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Dog: Codable {
|
||||
public var color: String? = "red"
|
||||
public var breed: String?
|
||||
|
||||
public init(className: String, color: String? = nil, breed: String? = nil) {
|
||||
public init(className: String, color: String? = "red", breed: String? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.breed = breed
|
||||
|
||||
@@ -22,7 +22,7 @@ public struct Order: Codable {
|
||||
public var status: Status?
|
||||
public var complete: Bool? = false
|
||||
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = nil) {
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = false) {
|
||||
self.id = id
|
||||
self.petId = petId
|
||||
self.quantity = quantity
|
||||
|
||||
@@ -15,7 +15,7 @@ public struct TypeHolderDefault: Codable {
|
||||
public var boolItem: Bool = true
|
||||
public var arrayItem: [Int]
|
||||
|
||||
public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) {
|
||||
public init(stringItem: String = "what", numberItem: Double, integerItem: Int, boolItem: Bool = true, arrayItem: [Int]) {
|
||||
self.stringItem = stringItem
|
||||
self.numberItem = numberItem
|
||||
self.integerItem = integerItem
|
||||
|
||||
@@ -88,7 +88,7 @@ class StoreAPITests: XCTestCase {
|
||||
let progressExpectation = self.expectation(description: "obtain progress")
|
||||
let requestBuilder = StoreAPI.getOrderByIdWithRequestBuilder(orderId: 1000)
|
||||
|
||||
requestBuilder.onProgressReady = { (progress) in
|
||||
requestBuilder.onProgressReady = { (_) in
|
||||
progressExpectation.fulfill()
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ public struct Animal: Codable {
|
||||
public var className: String
|
||||
public var color: String? = "red"
|
||||
|
||||
public init(className: String, color: String? = nil) {
|
||||
public init(className: String, color: String? = "red") {
|
||||
self.className = className
|
||||
self.color = color
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Cat: Codable {
|
||||
public var color: String? = "red"
|
||||
public var declawed: Bool?
|
||||
|
||||
public init(className: String, color: String? = nil, declawed: Bool? = nil) {
|
||||
public init(className: String, color: String? = "red", declawed: Bool? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.declawed = declawed
|
||||
|
||||
@@ -12,7 +12,7 @@ public struct Category: Codable {
|
||||
public var id: Int64?
|
||||
public var name: String = "default-name"
|
||||
|
||||
public init(id: Int64? = nil, name: String) {
|
||||
public init(id: Int64? = nil, name: String = "default-name") {
|
||||
self.id = id
|
||||
self.name = name
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Dog: Codable {
|
||||
public var color: String? = "red"
|
||||
public var breed: String?
|
||||
|
||||
public init(className: String, color: String? = nil, breed: String? = nil) {
|
||||
public init(className: String, color: String? = "red", breed: String? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.breed = breed
|
||||
|
||||
@@ -22,7 +22,7 @@ public struct Order: Codable {
|
||||
public var status: Status?
|
||||
public var complete: Bool? = false
|
||||
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = nil) {
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = false) {
|
||||
self.id = id
|
||||
self.petId = petId
|
||||
self.quantity = quantity
|
||||
|
||||
@@ -15,7 +15,7 @@ public struct TypeHolderDefault: Codable {
|
||||
public var boolItem: Bool = true
|
||||
public var arrayItem: [Int]
|
||||
|
||||
public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) {
|
||||
public init(stringItem: String = "what", numberItem: Double, integerItem: Int, boolItem: Bool = true, arrayItem: [Int]) {
|
||||
self.stringItem = stringItem
|
||||
self.numberItem = numberItem
|
||||
self.integerItem = integerItem
|
||||
|
||||
@@ -12,7 +12,7 @@ public struct Animal: Codable {
|
||||
public var className: String
|
||||
public var color: String? = "red"
|
||||
|
||||
public init(className: String, color: String? = nil) {
|
||||
public init(className: String, color: String? = "red") {
|
||||
self.className = className
|
||||
self.color = color
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Cat: Codable {
|
||||
public var color: String? = "red"
|
||||
public var declawed: Bool?
|
||||
|
||||
public init(className: String, color: String? = nil, declawed: Bool? = nil) {
|
||||
public init(className: String, color: String? = "red", declawed: Bool? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.declawed = declawed
|
||||
|
||||
@@ -12,7 +12,7 @@ public struct Category: Codable {
|
||||
public var id: Int64?
|
||||
public var name: String = "default-name"
|
||||
|
||||
public init(id: Int64? = nil, name: String) {
|
||||
public init(id: Int64? = nil, name: String = "default-name") {
|
||||
self.id = id
|
||||
self.name = name
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Dog: Codable {
|
||||
public var color: String? = "red"
|
||||
public var breed: String?
|
||||
|
||||
public init(className: String, color: String? = nil, breed: String? = nil) {
|
||||
public init(className: String, color: String? = "red", breed: String? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.breed = breed
|
||||
|
||||
@@ -22,7 +22,7 @@ public struct Order: Codable {
|
||||
public var status: Status?
|
||||
public var complete: Bool? = false
|
||||
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = nil) {
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = false) {
|
||||
self.id = id
|
||||
self.petId = petId
|
||||
self.quantity = quantity
|
||||
|
||||
@@ -15,7 +15,7 @@ public struct TypeHolderDefault: Codable {
|
||||
public var boolItem: Bool = true
|
||||
public var arrayItem: [Int]
|
||||
|
||||
public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) {
|
||||
public init(stringItem: String = "what", numberItem: Double, integerItem: Int, boolItem: Bool = true, arrayItem: [Int]) {
|
||||
self.stringItem = stringItem
|
||||
self.numberItem = numberItem
|
||||
self.integerItem = integerItem
|
||||
|
||||
@@ -88,7 +88,7 @@ class StoreAPITests: XCTestCase {
|
||||
let progressExpectation = self.expectation(description: "obtain progress")
|
||||
let requestBuilder = StoreAPI.getOrderByIdWithRequestBuilder(orderId: 1000)
|
||||
|
||||
requestBuilder.onProgressReady = { (progress) in
|
||||
requestBuilder.onProgressReady = { (_) in
|
||||
progressExpectation.fulfill()
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ public struct Order: Codable {
|
||||
public var status: Status?
|
||||
public var complete: Bool? = false
|
||||
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = nil) {
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = false) {
|
||||
self.id = id
|
||||
self.petId = petId
|
||||
self.quantity = quantity
|
||||
|
||||
@@ -12,7 +12,7 @@ internal struct Animal: Codable {
|
||||
internal var className: String
|
||||
internal var color: String? = "red"
|
||||
|
||||
internal init(className: String, color: String? = nil) {
|
||||
internal init(className: String, color: String? = "red") {
|
||||
self.className = className
|
||||
self.color = color
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ internal struct Cat: Codable {
|
||||
internal var color: String? = "red"
|
||||
internal var declawed: Bool?
|
||||
|
||||
internal init(className: String, color: String? = nil, declawed: Bool? = nil) {
|
||||
internal init(className: String, color: String? = "red", declawed: Bool? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.declawed = declawed
|
||||
|
||||
@@ -12,7 +12,7 @@ internal struct Category: Codable {
|
||||
internal var id: Int64?
|
||||
internal var name: String = "default-name"
|
||||
|
||||
internal init(id: Int64? = nil, name: String) {
|
||||
internal init(id: Int64? = nil, name: String = "default-name") {
|
||||
self.id = id
|
||||
self.name = name
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ internal struct Dog: Codable {
|
||||
internal var color: String? = "red"
|
||||
internal var breed: String?
|
||||
|
||||
internal init(className: String, color: String? = nil, breed: String? = nil) {
|
||||
internal init(className: String, color: String? = "red", breed: String? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.breed = breed
|
||||
|
||||
@@ -22,7 +22,7 @@ internal struct Order: Codable {
|
||||
internal var status: Status?
|
||||
internal var complete: Bool? = false
|
||||
|
||||
internal init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = nil) {
|
||||
internal init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = false) {
|
||||
self.id = id
|
||||
self.petId = petId
|
||||
self.quantity = quantity
|
||||
|
||||
@@ -15,7 +15,7 @@ internal struct TypeHolderDefault: Codable {
|
||||
internal var boolItem: Bool = true
|
||||
internal var arrayItem: [Int]
|
||||
|
||||
internal init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) {
|
||||
internal init(stringItem: String = "what", numberItem: Double, integerItem: Int, boolItem: Bool = true, arrayItem: [Int]) {
|
||||
self.stringItem = stringItem
|
||||
self.numberItem = numberItem
|
||||
self.integerItem = integerItem
|
||||
|
||||
@@ -12,7 +12,7 @@ import Foundation
|
||||
public var _className: String
|
||||
public var color: String? = "red"
|
||||
|
||||
public init(_className: String, color: String? = nil) {
|
||||
public init(_className: String, color: String? = "red") {
|
||||
self._className = _className
|
||||
self.color = color
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import Foundation
|
||||
}
|
||||
}
|
||||
|
||||
public init(_className: String, color: String? = nil, declawed: Bool? = nil) {
|
||||
public init(_className: String, color: String? = "red", declawed: Bool? = nil) {
|
||||
self._className = _className
|
||||
self.color = color
|
||||
self.declawed = declawed
|
||||
|
||||
@@ -17,7 +17,7 @@ import Foundation
|
||||
}
|
||||
public var name: String = "default-name"
|
||||
|
||||
public init(_id: Int64? = nil, name: String) {
|
||||
public init(_id: Int64? = nil, name: String = "default-name") {
|
||||
self._id = _id
|
||||
self.name = name
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import Foundation
|
||||
public var color: String? = "red"
|
||||
public var breed: String?
|
||||
|
||||
public init(_className: String, color: String? = nil, breed: String? = nil) {
|
||||
public init(_className: String, color: String? = "red", breed: String? = nil) {
|
||||
self._className = _className
|
||||
self.color = color
|
||||
self.breed = breed
|
||||
|
||||
@@ -42,7 +42,7 @@ import Foundation
|
||||
}
|
||||
}
|
||||
|
||||
public init(_id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = nil) {
|
||||
public init(_id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = false) {
|
||||
self._id = _id
|
||||
self.petId = petId
|
||||
self.quantity = quantity
|
||||
|
||||
@@ -15,7 +15,7 @@ import Foundation
|
||||
public var boolItem: Bool = true
|
||||
public var arrayItem: [Int]
|
||||
|
||||
public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) {
|
||||
public init(stringItem: String = "what", numberItem: Double, integerItem: Int, boolItem: Bool = true, arrayItem: [Int]) {
|
||||
self.stringItem = stringItem
|
||||
self.numberItem = numberItem
|
||||
self.integerItem = integerItem
|
||||
|
||||
@@ -12,7 +12,7 @@ public struct Animal: Codable {
|
||||
public var className: String
|
||||
public var color: String? = "red"
|
||||
|
||||
public init(className: String, color: String? = nil) {
|
||||
public init(className: String, color: String? = "red") {
|
||||
self.className = className
|
||||
self.color = color
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Cat: Codable {
|
||||
public var color: String? = "red"
|
||||
public var declawed: Bool?
|
||||
|
||||
public init(className: String, color: String? = nil, declawed: Bool? = nil) {
|
||||
public init(className: String, color: String? = "red", declawed: Bool? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.declawed = declawed
|
||||
|
||||
@@ -12,7 +12,7 @@ public struct Category: Codable {
|
||||
public var id: Int64?
|
||||
public var name: String = "default-name"
|
||||
|
||||
public init(id: Int64? = nil, name: String) {
|
||||
public init(id: Int64? = nil, name: String = "default-name") {
|
||||
self.id = id
|
||||
self.name = name
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Dog: Codable {
|
||||
public var color: String? = "red"
|
||||
public var breed: String?
|
||||
|
||||
public init(className: String, color: String? = nil, breed: String? = nil) {
|
||||
public init(className: String, color: String? = "red", breed: String? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.breed = breed
|
||||
|
||||
@@ -22,7 +22,7 @@ public struct Order: Codable {
|
||||
public var status: Status?
|
||||
public var complete: Bool? = false
|
||||
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = nil) {
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = false) {
|
||||
self.id = id
|
||||
self.petId = petId
|
||||
self.quantity = quantity
|
||||
|
||||
@@ -15,7 +15,7 @@ public struct TypeHolderDefault: Codable {
|
||||
public var boolItem: Bool = true
|
||||
public var arrayItem: [Int]
|
||||
|
||||
public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) {
|
||||
public init(stringItem: String = "what", numberItem: Double, integerItem: Int, boolItem: Bool = true, arrayItem: [Int]) {
|
||||
self.stringItem = stringItem
|
||||
self.numberItem = numberItem
|
||||
self.integerItem = integerItem
|
||||
|
||||
@@ -12,7 +12,7 @@ public struct Animal: Codable {
|
||||
public private(set) var className: String
|
||||
public private(set) var color: String? = "red"
|
||||
|
||||
public init(className: String, color: String? = nil) {
|
||||
public init(className: String, color: String? = "red") {
|
||||
self.className = className
|
||||
self.color = color
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Cat: Codable {
|
||||
public private(set) var color: String? = "red"
|
||||
public private(set) var declawed: Bool?
|
||||
|
||||
public init(className: String, color: String? = nil, declawed: Bool? = nil) {
|
||||
public init(className: String, color: String? = "red", declawed: Bool? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.declawed = declawed
|
||||
|
||||
@@ -12,7 +12,7 @@ public struct Category: Codable {
|
||||
public private(set) var id: Int64?
|
||||
public private(set) var name: String = "default-name"
|
||||
|
||||
public init(id: Int64? = nil, name: String) {
|
||||
public init(id: Int64? = nil, name: String = "default-name") {
|
||||
self.id = id
|
||||
self.name = name
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Dog: Codable {
|
||||
public private(set) var color: String? = "red"
|
||||
public private(set) var breed: String?
|
||||
|
||||
public init(className: String, color: String? = nil, breed: String? = nil) {
|
||||
public init(className: String, color: String? = "red", breed: String? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.breed = breed
|
||||
|
||||
@@ -22,7 +22,7 @@ public struct Order: Codable {
|
||||
public private(set) var status: Status?
|
||||
public private(set) var complete: Bool? = false
|
||||
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = nil) {
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = false) {
|
||||
self.id = id
|
||||
self.petId = petId
|
||||
self.quantity = quantity
|
||||
|
||||
@@ -15,7 +15,7 @@ public struct TypeHolderDefault: Codable {
|
||||
public private(set) var boolItem: Bool = true
|
||||
public private(set) var arrayItem: [Int]
|
||||
|
||||
public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) {
|
||||
public init(stringItem: String = "what", numberItem: Double, integerItem: Int, boolItem: Bool = true, arrayItem: [Int]) {
|
||||
self.stringItem = stringItem
|
||||
self.numberItem = numberItem
|
||||
self.integerItem = integerItem
|
||||
|
||||
@@ -12,7 +12,7 @@ public struct Animal: Codable {
|
||||
public var className: String
|
||||
public var color: String? = "red"
|
||||
|
||||
public init(className: String, color: String? = nil) {
|
||||
public init(className: String, color: String? = "red") {
|
||||
self.className = className
|
||||
self.color = color
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Cat: Codable {
|
||||
public var color: String? = "red"
|
||||
public var declawed: Bool?
|
||||
|
||||
public init(className: String, color: String? = nil, declawed: Bool? = nil) {
|
||||
public init(className: String, color: String? = "red", declawed: Bool? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.declawed = declawed
|
||||
|
||||
@@ -12,7 +12,7 @@ public struct Category: Codable {
|
||||
public var id: Int64?
|
||||
public var name: String = "default-name"
|
||||
|
||||
public init(id: Int64? = nil, name: String) {
|
||||
public init(id: Int64? = nil, name: String = "default-name") {
|
||||
self.id = id
|
||||
self.name = name
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Dog: Codable {
|
||||
public var color: String? = "red"
|
||||
public var breed: String?
|
||||
|
||||
public init(className: String, color: String? = nil, breed: String? = nil) {
|
||||
public init(className: String, color: String? = "red", breed: String? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.breed = breed
|
||||
|
||||
@@ -22,7 +22,7 @@ public struct Order: Codable {
|
||||
public var status: Status?
|
||||
public var complete: Bool? = false
|
||||
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = nil) {
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = false) {
|
||||
self.id = id
|
||||
self.petId = petId
|
||||
self.quantity = quantity
|
||||
|
||||
@@ -15,7 +15,7 @@ public struct TypeHolderDefault: Codable {
|
||||
public var boolItem: Bool = true
|
||||
public var arrayItem: [Int]
|
||||
|
||||
public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) {
|
||||
public init(stringItem: String = "what", numberItem: Double, integerItem: Int, boolItem: Bool = true, arrayItem: [Int]) {
|
||||
self.stringItem = stringItem
|
||||
self.numberItem = numberItem
|
||||
self.integerItem = integerItem
|
||||
|
||||
@@ -12,7 +12,7 @@ public struct Animal: Codable {
|
||||
public var className: String
|
||||
public var color: String? = "red"
|
||||
|
||||
public init(className: String, color: String? = nil) {
|
||||
public init(className: String, color: String? = "red") {
|
||||
self.className = className
|
||||
self.color = color
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Cat: Codable {
|
||||
public var color: String? = "red"
|
||||
public var declawed: Bool?
|
||||
|
||||
public init(className: String, color: String? = nil, declawed: Bool? = nil) {
|
||||
public init(className: String, color: String? = "red", declawed: Bool? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.declawed = declawed
|
||||
|
||||
@@ -12,7 +12,7 @@ public struct Category: Codable {
|
||||
public var id: Int64?
|
||||
public var name: String = "default-name"
|
||||
|
||||
public init(id: Int64? = nil, name: String) {
|
||||
public init(id: Int64? = nil, name: String = "default-name") {
|
||||
self.id = id
|
||||
self.name = name
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Dog: Codable {
|
||||
public var color: String? = "red"
|
||||
public var breed: String?
|
||||
|
||||
public init(className: String, color: String? = nil, breed: String? = nil) {
|
||||
public init(className: String, color: String? = "red", breed: String? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.breed = breed
|
||||
|
||||
@@ -22,7 +22,7 @@ public struct Order: Codable {
|
||||
public var status: Status?
|
||||
public var complete: Bool? = false
|
||||
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = nil) {
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = false) {
|
||||
self.id = id
|
||||
self.petId = petId
|
||||
self.quantity = quantity
|
||||
|
||||
@@ -15,7 +15,7 @@ public struct TypeHolderDefault: Codable {
|
||||
public var boolItem: Bool = true
|
||||
public var arrayItem: [Int]
|
||||
|
||||
public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) {
|
||||
public init(stringItem: String = "what", numberItem: Double, integerItem: Int, boolItem: Bool = true, arrayItem: [Int]) {
|
||||
self.stringItem = stringItem
|
||||
self.numberItem = numberItem
|
||||
self.integerItem = integerItem
|
||||
|
||||
@@ -12,7 +12,7 @@ public struct Animal: Codable {
|
||||
public var className: String
|
||||
public var color: String? = "red"
|
||||
|
||||
public init(className: String, color: String? = nil) {
|
||||
public init(className: String, color: String? = "red") {
|
||||
self.className = className
|
||||
self.color = color
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Cat: Codable {
|
||||
public var color: String? = "red"
|
||||
public var declawed: Bool?
|
||||
|
||||
public init(className: String, color: String? = nil, declawed: Bool? = nil) {
|
||||
public init(className: String, color: String? = "red", declawed: Bool? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.declawed = declawed
|
||||
|
||||
@@ -12,7 +12,7 @@ public struct Category: Codable {
|
||||
public var id: Int64?
|
||||
public var name: String = "default-name"
|
||||
|
||||
public init(id: Int64? = nil, name: String) {
|
||||
public init(id: Int64? = nil, name: String = "default-name") {
|
||||
self.id = id
|
||||
self.name = name
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public struct Dog: Codable {
|
||||
public var color: String? = "red"
|
||||
public var breed: String?
|
||||
|
||||
public init(className: String, color: String? = nil, breed: String? = nil) {
|
||||
public init(className: String, color: String? = "red", breed: String? = nil) {
|
||||
self.className = className
|
||||
self.color = color
|
||||
self.breed = breed
|
||||
|
||||
@@ -22,7 +22,7 @@ public struct Order: Codable {
|
||||
public var status: Status?
|
||||
public var complete: Bool? = false
|
||||
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = nil) {
|
||||
public init(id: Int64? = nil, petId: Int64? = nil, quantity: Int? = nil, shipDate: Date? = nil, status: Status? = nil, complete: Bool? = false) {
|
||||
self.id = id
|
||||
self.petId = petId
|
||||
self.quantity = quantity
|
||||
|
||||
@@ -15,7 +15,7 @@ public struct TypeHolderDefault: Codable {
|
||||
public var boolItem: Bool = true
|
||||
public var arrayItem: [Int]
|
||||
|
||||
public init(stringItem: String, numberItem: Double, integerItem: Int, boolItem: Bool, arrayItem: [Int]) {
|
||||
public init(stringItem: String = "what", numberItem: Double, integerItem: Int, boolItem: Bool = true, arrayItem: [Int]) {
|
||||
self.stringItem = stringItem
|
||||
self.numberItem = numberItem
|
||||
self.integerItem = integerItem
|
||||
|
||||
@@ -88,7 +88,7 @@ class StoreAPITests: XCTestCase {
|
||||
let progressExpectation = self.expectation(description: "obtain progress")
|
||||
let requestBuilder = StoreAPI.getOrderByIdWithRequestBuilder(orderId: 1000)
|
||||
|
||||
requestBuilder.onProgressReady = { (progress) in
|
||||
requestBuilder.onProgressReady = { (_) in
|
||||
progressExpectation.fulfill()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user