Open AnActualEmerald opened 4 months ago
Hello @AnActualEmerald ! Thanks for using rustemon
and for reaching out ! Good catch !
I reproduced the error. I also looked at PokeAPI docs and the evolution_chain::get_all_entries
function do respect the specs under Resource Lists/Pagination at https://pokeapi.co/docs/v2.
So if I'm not missing something here, it looks like there a delta between PokeAPI format and the actual data send.
I think PokeAPI should resolve this first and then rustemon
should be modified if needed.
Do you want to handle this or you rather prefer me to contact them ? Please let me know
I opened an issue there as well, https://github.com/PokeAPI/pokeapi/issues/1063. I have a fix in my fork that adds a branch to the endpoint macro for unnamed resources, assuming that his is intentional just not documented, https://github.com/AnActualEmerald/rustemon/commit/876859c9d224a3f6e21624aea81b805c98d84bb7. Depending on what pokeapi's response is there may be other endpoints that would affected by this too.
I agree! Let's wait for their answer and we'll proceed accordingly.
In the meantime, thanks again for your work and patience!
The generated function for
evolution_chain::get_all_entries
expects to get a list ofNamedApiResource<EvolutionChain>
, but PokeAPI doesn't give a name for evolution chains:outputs
Which causes reqwest to return a decode error for the missing
name
field