PokeAPI / pokeapi

The Pokémon API
https://pokeapi.co
BSD 3-Clause "New" or "Revised" License
4.15k stars 935 forks source link

Missing documentation for unnamed API resources #1063

Open AnActualEmerald opened 6 months ago

AnActualEmerald commented 6 months ago

Some paginated endpoints return API resources without a name field, but this behavior isn't mentioned anywhere in the docs.

Steps to Reproduce:

curl "https://pokeapi.co/api/v2/evolution-chain?limit=3" | jq

Results in the output:

{
  "count": 541,
  "next": "https://pokeapi.co/api/v2/evolution-chain?offset=3&limit=3",
  "previous": null,
  "results": [
    {
      "url": "https://pokeapi.co/api/v2/evolution-chain/1/"
    },
    {
      "url": "https://pokeapi.co/api/v2/evolution-chain/2/"
    },
    {
      "url": "https://pokeapi.co/api/v2/evolution-chain/3/"
    }
  ]
}

Where the resources in the results array just have a url and no name

Naramsim commented 6 months ago

Hi, I modified the docs: https://staging.pokeapi.co/docs/v2#resource-listspagination-section Can you check before merging?

Check the Resource Lists/Pagination section

AnActualEmerald commented 6 months ago

Looks good to me, thanks 👍

mlemesle commented 6 months ago

Hey there!

Sorry to intrude in the discussion, but is there a way to be a bit more precise about this? Like flagging or listing which endpoints are named/unamed? As is, the docs do not tell how to read the data, which can be tedious while deserializing the payload

Naramsim commented 6 months ago

Hi, in the new docs I added the entry:

characteristic, contest-effect, evolution-chain, machine, super-contest-effect endpoints are unnamed, the rest are named.