PokeAPI / pokeapi

The Pokémon API
https://pokeapi.co
BSD 3-Clause "New" or "Revised" License
4.12k stars 931 forks source link

Differences in different APIs handling forms #1035

Open justingolden21 opened 7 months ago

justingolden21 commented 7 months ago

Not sure if bug report or feature request, but I suppose it's a feature request

I spent a long, long, long time trying to debug this. Apparently:

https://pokeapi.co/api/v2/pokemon-species/ has giratina-altered as a 404 but giratina returns data

https://pokeapi.co/api/v2/pokemon/ has giratina as 404 but giratina-altered returns data

I'd love for this to be consistent. Obviously form differences don't have different dex entries, but can have different stats for example. I also realize of course we wouldn't be making existing APIs now return a 404. However, my suggestion is simply for giratina to redirect to giratina-altered for the pokemon-species API and to have giratina-altered redirect to giratina for the pokemon API.

Thank you in advance!

justingolden21 commented 7 months ago

Or at least some docs on this in a more obvious location (if not already).

Love the API by the way!

GreatNovaDragon commented 7 months ago

Form differences have different dex entries

GreatNovaDragon commented 7 months ago

This is a thing since Sun and Moon (even if the specific dex entry for girantinas forme change has been only introduced in Legends Arceus), and given that the data model here, copied from veekun/pokedex, was created before Sun and Moon, where alternate forms really were more unusual and not outright different species with the same name and natdex number, this is an outdated model.