CodingKeys breaks Decodable in my model

This gives me the “Type ‘Business’ does not conform to protocol ‘Decodable’. …” error. Removing CodingKeys enum fixes that. I"m just following Les 7 Mod 6

struct Business : Decodable, Identifiable {
var id: String?

var name: String?
var alias: String?
var isClosed: Bool?
var imageUrl: String?
var reviewCount : Int?
var categories : [Category]?
var rating : Double?
var coordinates : Coordinate?
var transactions: [String]?
var price: String?
var displayPhone: String?
var distance: Double?
var location : Location?

enum CodingKeys : String, CodingKey {
    case imageUrl = "image_url"
    case isClosed = "is_closed"
    case reviewCount = "review_count"
    case displayPhone = "display_phone"
    case id
    case name
    case alias
    case url
    case categories
    case transactions
    case price
    case location
    case distance
    case coordinates


You have an extra url case in your CodingKeys enum that doesn’t correspond to any property of the Business struct.

And while this doesn’t cause a problem because you might actually want to leave it out, I just thought I’d point out you don’t have rating in there.

That solves it. Thanks a lot!