Contract errors and unclarity about Pokemon form names
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
- 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
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.
More from PokeAPI/pokeapi
-
Difficulty 2/5 1-2 days Newbie friendliness 76/100
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
UV hardlink files Open
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Ball legality Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
Similar issues
-
bug priority:low
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
CyberAgent/psd2svg#436 ·
-
area/install-update comp/cli comp/desktop P3 sweeper:risk-compatibility type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
NousResearch/hermes-agent#122386 · 1 comment ·
-
ai-generated
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/production-stack#1105 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100