PokemonAPI icon indicating copy to clipboard operation
PokemonAPI copied to clipboard

#24 - PKMItemHolderPokemonVersionDetail class Change DTO data type

Open QuaRang1225 opened this issue 1 year ago • 0 comments

Of the data in the class PKMitemHolderPokemonVersionDetail, the "rarity" data actually gives a value of Int form, but the "jsonParsingError" error appears when trying to decode it as string within the package. I want to contribute after solving this problem Thank you.

held_Items

"version_details": [
      {
          "rarity": 5,    //this data
          "version": {
              "name": "ruby",
              "url": "https://pokeapi.co/api/v2/version/7/"
          }
      }
]
open class PKMItemHolderPokemonVersionDetail: Codable {
    
    open var rarity: String?    //data is not correct
    
    open var version: PKMNamedAPIResource<PKMVersion>?
}

QuaRang1225 avatar Dec 01 '23 07:12 QuaRang1225