Skip to content

fix: Update router root view to include meta api#1614

Merged
Naramsim merged 1 commit into
PokeAPI:masterfrom
FallenDeity:update-router
Jul 22, 2026
Merged

fix: Update router root view to include meta api#1614
Naramsim merged 1 commit into
PokeAPI:masterfrom
FallenDeity:update-router

Conversation

@FallenDeity

Copy link
Copy Markdown
Contributor

Change description

Subclasses the router to include the meta api into the api/v2 router since an APIView cannot be registered to a router it is being reversed via drf and added to the router

I looked into viewsets and a retrieve only viewset wouldnt work since the router root view lists the list endpoints which causes openapi to pick this endpoint up wrong creating this conundrum

image image

AI coding assistance disclosure

None

Contributor check list

  • I have written a description of the contribution and explained its motivation.
  • I have written tests for my code changes (if applicable).
  • I have read and understood the AI Assisted Contribution guidelines.
  • I will own this change in production, and I am prepared to fix any bugs caused by my code change.

@FallenDeity

Copy link
Copy Markdown
Contributor Author

pinging with the change @Naramsim regarding this #1609 (comment) missed it in the previous pr, just tested the api endpoint behavior missing the router + ditto tool behavior. sorry!

should i add a test which tests api/v2 for all the endpoints too to prevent this in future, i used to imagine ditto crawled all the urls on pokeapi via root

hmm seems like pokemon/id/encounters seems to be done via transform as a partial side effect to this to when calling clone_all

@Naramsim

Copy link
Copy Markdown
Member

Hi! Thanks for the quick fix. I tested it on my side and when querying the pokemon endpoint for the encounters everything seems to work just fine. I'm merging.

@Naramsim
Naramsim merged commit 55debc0 into PokeAPI:master Jul 22, 2026
19 checks passed
@pokeapi-machine-user

Copy link
Copy Markdown

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 staging branch will be deployed in our staging environment and the entire API will be ready to review.

A Pull Request (master<-staging) will be also created at PokeAPI/api-data and assigned to the PokeAPI Core team to be reviewed. If approved and merged new data will soon be available worldwide at pokeapi.co.

@pokeapi-machine-user

Copy link
Copy Markdown

The updater script has finished its job and has now opened a Pull Request towards PokeAPI/api-data with the updated data.

The Pull Request can be seen deployed in our staging environment when CircleCI deploy will be finished (check the start time of the last build).

Naramsim pushed a commit to PokeAPI/api-data that referenced this pull request Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants