I have codable model
struct Foo: Codable {
enum Status: Int, Codable {
case one, two, three, four, five
}
var statuses: [Status]
}
when I'm trying to send request to http://localhost:8080/users?statuses[]=1&statuses[]=2
I'm getting this error
[ ERROR ] URLEncodedFormError.convertible: Could not convert Status to form-urlencoded data.
Model below with just [Int] works as expected, so I guess that there's a bug with enums decoding
struct Foo: Codable {
var statuses: [Int]
}