PokeAPI: spec vs live

Summary

Spec
https://raw.githubusercontent.com/PokeAPI/pokeapi/master/openapi.yml (OpenAPI 3)
Base URL
https://pokeapi.co
Run
, read-only GET requests, no credentials
Coverage
102 operations in the spec, 30 requests sent, 30 successful,30 operations observed
Hard violations
1 distinct schema locations
Reviewer note
Confirmed: evolution-chain baby_trigger_item is null; the spec does not allow null.

Hard violations 1

A typed client generated from the spec would break on these.

Hide 1 finding
GET /api/v2/evolution-chain/{id}/ > response 200 > application/json > /baby_trigger_item

response body at /baby_trigger_item: value is null but the schema does not allow null

GET /api/v2/evolution-chain/1/ → 200 application/json; charset=utf-8
expected ["object"] actual null
  • If the spec is the source of truth: Return a non-null value in response body at /baby_trigger_item.
  • If the implementation is the source of truth: Allow null at paths["/api/v2/evolution-chain/{id}/"].get.responses["200"].content["application/json"].schema.properties["baby_trigger_item"] (add "null" to type, or nullable: true in OpenAPI 3.0).

Reproduce

The first hard violation came from this request. Compare the response to the schema at the location named in the finding.

curl -s -H 'Accept: application/json' 'https://pokeapi.co/api/v2/evolution-chain/1/'

Data

If a finding is wrong, open an issue; if it is right, a pull request on the spec is welcome.