PokemonAPI icon indicating copy to clipboard operation
PokemonAPI copied to clipboard

[Class] Incorrect class type on Version

Open lmcjt37 opened this issue 10 months ago • 0 comments

Fixes incorrect class type used for VersionGroup inside Version class.

open class PKMVersion: Codable, SelfDecodable {
    
    /// The identifier for this version resource
    open var id: Int?
    
    /// The name for this version resource
    open var name: String?
    
    /// The name of this version listed in different languages
    open var names: [PKMName]?
    
    /// The version group this version belongs to
    open var versionGroup: PKMNamedAPIResource<PKMVersion>? <--- here
    
    public static var decoder: JSONDecoder = {
        let decoder = JSONDecoder()
        decoder.keyDecodingStrategy = .convertFromSnakeCase
        return decoder
    }()
}

lmcjt37 avatar Apr 08 '24 21:04 lmcjt37