When enum case is unrecognised and `enumUndecodableCase`=true, how can I know the value?
Ricardo1980 opened this issue · comments
Ricardo Ruiz Lopez commented
Hello,
When using the option enumUndecodableCase
, we will use the unknown
case when a value is not recognised by the data mapping generated code.
#141
#135
How can I know the value that was not recognised? Is there any way?
Right now we have:
struct PaymentMethod {
enum Type {
case creditCard
case unknown
}
let type: Type
}
Would be possible to have something similar to this?
struct PaymentMethod: String {
enum Type {
case creditCard
case unknown(_ value: String)
}
let type: Type
}
Thanks a lot.