Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Contract errors and unclarity about Pokemon form names

Aperta
#1,241 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java, openapi, python
Ambito
api, documentation

Direzione di ricerca

Inizia confrontando il contratto di PokemonDetail per held_items e i campi nullable richiesti con le risposte per Delphox e gli altri Pokémon interessati. Poi esamina il comportamento della ricerca dei nomi per aegislash, basculegion e basculin; il lavoro è completato quando il contratto corrisponde alle risposte effettive e i nomi delle forme eccezionali sono documentati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Python
Stelle
5.4k
Fork
1.2k
Merge medio
2g 4h
PR unite (30g)
18

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PokeAPI/pokeapi

Tutte le issue di PokeAPI/pokeapi

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.