Uh oh!
There was an error while loading. Please reload this page.
fix(openapi): Mark Region.main_generation as nullable - #1486
Conversation
The Hisui region (and potentially others) have no main_generation, causing the API to return null for this field. The OpenAPI spec was incorrectly marking it as required and non-nullable. FixesPokeAPI#1397
Naramsim
commented
Apr 13, 2026
Hi, did you manually change the spec or did you run the generator? |
Some regions (e.g. Hisui) have no main_generation, so the API returns null for this field. Adding allow_null=True to the serializer field so the generated OpenAPI spec correctly marks it as nullable. FixesPokeAPI#1397
santichausis
commented
Apr 14, 2026
I manually edited the spec this time, but I've updated the PR to make the change in the serializer instead (allow_null=True on main_generation), so the spec can be regenerated from the source. |
Naramsim
commented
Apr 18, 2026
Hi can you run the linter and commit the changed openapi.yml? |
santichausis
commented
Apr 28, 2026
Done! Ran black on the serializer and regenerated the openapi.yml. |
Uh oh!
There was an error while loading. Please reload this page.
pokeapi-machine-user
commented
Apr 29, 2026
A PokeAPI/api-data refresh has started. In ~45 minutes the staging branch of PokeAPI/api-data will be pushed with the new generated data. |
pokeapi-machine-user
commented
Apr 29, 2026
The updater script has finished its job and has now opened a Pull Request towards PokeAPI/api-data with the updated data. |
The Hisui region (and potentially others) have no
main_generation, causing the API to returnnullfor this field. The OpenAPI spec was incorrectly marking it as required and non-nullable.Changes:
nullable: truetoRegion.main_generationmain_generationfrom therequiredarrayFixes#1397