fix(openapi): Mark Region.main_generation as nullable#1486
fix(openapi): Mark Region.main_generation as nullable#1486Naramsim merged 3 commits intoPokeAPI:masterfrom
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. Fixes PokeAPI#1397
|
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. Fixes PokeAPI#1397
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. |
|
Hi can you run the linter and commit the changed openapi.yml? |
|
Done! Ran black on the serializer and regenerated the openapi.yml. |
|
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. |
|
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