Skip to content

feat: Mark get api metadata as get method#1609

Merged
Naramsim merged 1 commit into
PokeAPI:masterfrom
FallenDeity:metadata-api-schema
Jul 20, 2026
Merged

feat: Mark get api metadata as get method#1609
Naramsim merged 1 commit into
PokeAPI:masterfrom
FallenDeity:metadata-api-schema

Conversation

@FallenDeity

@FallenDeity FallenDeity commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Change description

Previously api metadata openapi schema defined it as a list which is misleading, redefined the schema to return an object since thats whats actually returned by the api (list -> get)

image
      responses:
        '200':
          content:
            application/json:
              schema:
-              type: array
+              type: object

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
FallenDeity force-pushed the metadata-api-schema branch from 5d10d19 to 6845975 Compare July 19, 2026 19:38
@Naramsim
Naramsim merged commit aa56b59 into PokeAPI:master Jul 20, 2026
19 checks passed
@Naramsim

Copy link
Copy Markdown
Member

Thanks a lot!

@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

Copy link
Copy Markdown
Member

Hi, after your changes the endpoint seems not to be present anymore:

https://github.com/PokeAPI/api-data/pull/407/changes

@FallenDeity

FallenDeity commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

thats weird I'll give it a look once I am back home, looks like it got removed from the api-data update

@Naramsim

Copy link
Copy Markdown
Member

I can confirm the behavior on my local machine. I should have tested on my PC before merging. Can you test locally on your PC as well?

@FallenDeity

FallenDeity commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

I can confirm the behavior on my local machine. I should have tested on my PC before merging. Can you test locally on your PC as well?

I think i have an inlking why, are you able to access api/v2/meta the url should be present but only exluded from the root view? I think the reason is that meta was removed from api/v2 consolidated router in url patterns and added as a separate standalone path to url patterns hence its no longer present under root router api/v2 which is what ditto seems to crawl to clone

edit: looks like the router needs to be subclassed to allow meta into the view since apiview cannot be registered into the router https://stackoverflow.com/questions/17496249/in-django-restframework-how-to-change-the-api-root-documentation

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