Skip to content

Commit 4881704

Browse files
fix(specs): ingestion destination reject indexPrefix (generated)
algolia/api-clients-automation#3478 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent b2c5dba commit 4881704

File tree

2 files changed

+1
-47
lines changed

2 files changed

+1
-47
lines changed

Sources/Ingestion/Models/DestinationIndexPrefix.swift

Lines changed: 0 additions & 39 deletions
This file was deleted.

Sources/Ingestion/Models/DestinationInput.swift

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,19 @@ import Foundation
77
#endif
88

99
public enum DestinationInput: Codable, JSONEncodable, AbstractEncodable {
10-
case destinationIndexPrefix(DestinationIndexPrefix)
1110
case destinationIndexName(DestinationIndexName)
1211

1312
public func encode(to encoder: Encoder) throws {
1413
var container = encoder.singleValueContainer()
1514
switch self {
16-
case let .destinationIndexPrefix(value):
17-
try container.encode(value)
1815
case let .destinationIndexName(value):
1916
try container.encode(value)
2017
}
2118
}
2219

2320
public init(from decoder: Decoder) throws {
2421
let container = try decoder.singleValueContainer()
25-
if let value = try? container.decode(DestinationIndexPrefix.self) {
26-
self = .destinationIndexPrefix(value)
27-
} else if let value = try? container.decode(DestinationIndexName.self) {
22+
if let value = try? container.decode(DestinationIndexName.self) {
2823
self = .destinationIndexName(value)
2924
} else {
3025
throw DecodingError.typeMismatch(
@@ -36,8 +31,6 @@ public enum DestinationInput: Codable, JSONEncodable, AbstractEncodable {
3631

3732
public func GetActualInstance() -> Encodable {
3833
switch self {
39-
case let .destinationIndexPrefix(value):
40-
value as DestinationIndexPrefix
4134
case let .destinationIndexName(value):
4235
value as DestinationIndexName
4336
}

0 commit comments

Comments
 (0)