PokeAPI / PokeAPI/pokeapi

Blank past ability entries

Open Beginner friendly
#1,631 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5.4k
Forks
1.2k
Avg merge
2d 5h
Merged PRs (30d)
21

Description

The past_abilites field in pokemon endpoint has some redundant data which points to no actual ability for example for bulbasaur (1)

"past_abilities": [
    {
        "abilities": [
            {
                "ability": null,
                "is_hidden": true,
                "slot": 3
            }
        ],
        "generation": {
            "name": "generation-iv",
            "url": "https://pokeapi.co/api/v2/generation/4/"
        }
    }
]

imo either it should point to an ability resource or the past_abilities array should be empty also idt bulbasaur got any change of abilities and this issue is across a bunch of pokemon where the ability_id is blank in here https://github.com/PokeAPI/pokeapi/blob/master/data/v2/csv/pokemon_abilities_past.csv which is causing this

think historically it got added somewhere around here in this commit https://github.com/PokeAPI/pokeapi/commit/b23cd6fb3049eb493f64b4cd9de05cbeea8d93d9 removing the rows with blank entries should fix it

just wanted to ask tho was there any reason why it was added that I might be missing? thank you :)

cc: @jemarq04

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with data/v2/csv/pokemon_abilities_past.csv and compare the affected rows with the response from the Pokémon endpoint. Review commit b23cd6fb3049eb493f64b4cd9de05cbeea8d93d9 to understand why blank ability entries were added. Done means affected Pokémon no longer expose past ability records whose ability is null, while preserving valid historical entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, database
Issue type
Bug
Difficulty
2/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.