Open Ricardo1980 opened 1 year ago
Hello,
When using the option enumUndecodableCase, we will use the unknown case when a value is not recognised by the data mapping generated code. https://github.com/yonaskolb/SwagGen/pull/141 https://github.com/yonaskolb/SwagGen/issues/135
enumUndecodableCase
unknown
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.
Hello,
When using the option
enumUndecodableCase
, we will use theunknown
case when a value is not recognised by the data mapping generated code. https://github.com/yonaskolb/SwagGen/pull/141 https://github.com/yonaskolb/SwagGen/issues/135How can I know the value that was not recognised? Is there any way?
Right now we have:
Would be possible to have something similar to this?
Thanks a lot.