Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Contract errors and unclarity about Pokemon form names

Open
#1,241 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, openapi, python
Domain
api, documentation

Research direction

Start by comparing the PokemonDetail contract's held_items and required nullable fields with responses for Delphox and other affected Pokémon. Then inspect name lookup behavior for aegislash, basculegion, and basculin; done means the contract matches actual responses and the exceptional form names are documented.

Written by the indexing model from the issue text.

Description

During testing of your OpenAI contract solution, I have come across some errors.

In the contract, it is stated this:

(Within PokemonDetail in contract)

        held_items:
          type: object              <---- held_items must be an object.
          required:
            - item
            - version_details
         

However, for example Delphox (https://pokeapi.co/api/v2/pokemon/delphox/), held_items is an empty array, which fails in parsing because it is not an object. In some cases, an attribute is required by contract but is null. These two cases produces these two errors:

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Not a JSON Object: []
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Not a JSON Object: null

A large number of the total pokemon in your API have one or both of these problems. (About ~100 from my incomplete testing) All my testing was done purely with methods generated from the contract with OpenAPI Generator, and when Pokemon were queried by name - not ID. I have not tested with ID query.

Also, I found out through my testing that there are a few pokemon who cannot be queried with "normal" name means. I saw in earlier issues that you are aware, but it would be helpful to have this information accessible in the PokeAPI with the actual list of Pokemon who don't fit the normal bill and need form-appendixes to their name.
For example:

  • aegislash
  • basculegion
  • basculin
Dominant language
Python
Stars
5.4k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
18

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.

More from PokeAPI/pokeapi

All issues in PokeAPI/pokeapi

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.