pokeapi icon indicating copy to clipboard operation
pokeapi copied to clipboard

evolution-chain uses inconsistent schema for evolution_details

Open zberk opened this issue 10 years ago • 4 comments

Best example to compare is evolution-chain/1 and evolution-chain/34.

The evolution_details property for evolves_to can be null, a single value, or an array. I propose wrapping all values in an array so that the expected type remains consistent.

zberk avatar May 12 '16 13:05 zberk

👍 good idea, and a fairly simple task for anyone looking for an easy thing to do :)

phalt avatar May 12 '16 13:05 phalt

Currently running into this issue while working on my Kotlin/Java wrapper for the API. It's tough to work around this in a statically typed language.

Any tips on where in the code I can look to contribute a fix?

sargunv avatar May 24 '16 01:05 sargunv

I am pretty sure the problem is in serializers.py in the pokemon_v2 folder. Search for the EvolutionChainDetailSerializer class (its a big file). Please let me know what you find. Thank you and good luck!

Edit: Did not mean to close this issue, my bad

zberk avatar May 24 '16 02:05 zberk

Thanks, I'll let the table building stuff run tonight and check it out tomorrow.

sargunv avatar May 24 '16 02:05 sargunv