Skip to content

Commit da0bb17

Browse files
fix(specs): ingestion search endpoint (generated)
algolia/api-clients-automation#3487 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 8e968f0 commit da0bb17

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Sources/Ingestion/Models/TransformationSearch.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,32 @@ import Foundation
77
#endif
88

99
public struct TransformationSearch: Codable, JSONEncodable {
10-
public var transformationsIDs: [String]
10+
public var transformationIDs: [String]?
1111

12-
public init(transformationsIDs: [String]) {
13-
self.transformationsIDs = transformationsIDs
12+
public init(transformationIDs: [String]? = nil) {
13+
self.transformationIDs = transformationIDs
1414
}
1515

1616
public enum CodingKeys: String, CodingKey, CaseIterable {
17-
case transformationsIDs
17+
case transformationIDs
1818
}
1919

2020
// Encodable protocol methods
2121

2222
public func encode(to encoder: Encoder) throws {
2323
var container = encoder.container(keyedBy: CodingKeys.self)
24-
try container.encode(self.transformationsIDs, forKey: .transformationsIDs)
24+
try container.encodeIfPresent(self.transformationIDs, forKey: .transformationIDs)
2525
}
2626
}
2727

2828
extension TransformationSearch: Equatable {
2929
public static func ==(lhs: TransformationSearch, rhs: TransformationSearch) -> Bool {
30-
lhs.transformationsIDs == rhs.transformationsIDs
30+
lhs.transformationIDs == rhs.transformationIDs
3131
}
3232
}
3333

3434
extension TransformationSearch: Hashable {
3535
public func hash(into hasher: inout Hasher) {
36-
hasher.combine(self.transformationsIDs.hashValue)
36+
hasher.combine(self.transformationIDs?.hashValue)
3737
}
3838
}

0 commit comments

Comments
 (0)