Skip to content

edonv/OpenPokeAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenPokéAPI

Static Badge Static Badge GitHub License

OpenPokéAPI is an OpenAPI 3.1 spec for PokéAPI (GitHub).

Repo Contents

In the openapi folder, is the spec broken down into separate files for easier consumption. In the dist folder is the spec "bundled" together into a single file for uses that can't handle an OpenAPI description spread across multiple file. The bundled file is generated using the Redocly CLI's bundle command.

To-Do's

  • Add required to every object type in the spec 😭
  • Add response examples from docs
  • Refactor PokemonSpritesVersions to more modular types (keys are Generation names then either Version or VersionGroup names)
  • Add resuable schema component for response headers
  • Write tests (in Postman or Swift or something) that calls Resource List to get valid IDs for each endpoint, then run those values for validation.
  • Finish fixing the GitHub Action that runs the Redocly CLI bundle command.
    • Maybe in same or different plugin, make code that automatically adds required field?
    • Once plugin below is finished, make sure this action uses it.
    • Add plain split command to Action as well, and have bundle command place bundled file in /bundled folder, and the split command place files in /split folder. That way people can use both single-file and multi-file versions with the custom x- properties already expanded.
  • Figure out how to standardize custom OpenAPI fields for specifying the endpoint each NamedAPIResource/NamedAPIResourceList would point to.
    • This would normally would use links field on path objects.
    • Make a custom plugin for Redocly that looks at a custom x-___ property on APIReference/NamedAPIReference properties to automatically expands to links fields on the operations.

About

OpenAPI spec for PokéAPI

Resources

Stars

Watchers

Forks

Sponsor this project