Skip to content

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

Open
FallenDeity wants to merge 1 commit into
PokeAPI:masterfrom
FallenDeity:update-router
Open

fix: Update router root view to include meta api#1614
FallenDeity wants to merge 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

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.

1 participant