Pokemon past abilities not returning correct data
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1.2k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 21
Description
When getting the details of a pokemon (pokeapi.co/api/v2/pokemon/{id}) the past_abilities are wrong and the response is always:
"past_abilities": [
{
"abilities": [
{
"ability": null,
"is_hidden": true,
"slot": 3
}
],
"generation": {
"name": "generation-iv",
"url": "https://pokeapi.co/api/v2/generation/4/"
}
}
]
The null ability breaks the deserialization contract because a null ability should not exist.
I've been able to reproduce the issue with the first 10 pokemon (id 1 to 10).
Steps to Reproduce:
- call https://pokeapi.co/api/v2/pokemon/1
- scroll to the
past_abilitiesdata
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by calling the documented Pokémon endpoint for IDs 1 through 10 and inspect how past_abilities is assembled in the API. Trace the source of the null ability entries, then verify that these responses no longer include null abilities and retain the correct past ability data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100