PokéAPI · API Governance Rules
PokéAPI API Rules
Spectral linting rules defining API design standards and conventions for PokéAPI.
27 Rules
error 8
warn 11
info 8
Rule Categories
info
named
openapi
operation
operations
pagination
path
paths
pokeapi
response
schemas
servers
tags
Rules
error
info-title-required
Info title must be defined.
$.info
warn
info-description-required
Info description must be defined.
$.info
error
info-version-required
Info version must be defined.
$.info
warn
info-license-required
PokéAPI is BSD-3-Clause licensed — info.license must be present.
$.info
error
openapi-version-3
OpenAPI version must be 3.x.
$
error
servers-defined
Servers must be defined.
$
info
pokeapi-base-url
PokéAPI base URL should be https://pokeapi.co/api/v2.
$.servers[*]
warn
paths-kebab-case
PokéAPI path segments are kebab-case (e.g. /berry-firmness, /location-area).
$.paths[*]~
info
paths-no-trailing-slash
Paths should not end with a trailing slash inside the spec.
$.paths[*]~
warn
paths-no-camel-case
PokéAPI path segments must not use camelCase.
$.paths[*]~
error
operations-read-only
All PokéAPI operations are read-only — only GET should be used.
$.paths[*]
error
operation-id-required
Every operation must declare operationId.
$.paths[*][get]
warn
operation-id-camel-case
operationId must be camelCase (e.g. getPokemon, listMoves).
$.paths[*][get].operationId
info
operation-id-list-or-get-prefix
Single-resource operations should be prefixed with `get` and collection operations with `list`.
$.paths[*][get].operationId
error
operation-summary-required
Each operation must have a summary.
$.paths[*][get]
warn
operation-summary-title-case
Operation summaries should use Title Case.
$.paths[*][get].summary
warn
operation-description-required
Each operation must have a description.
$.paths[*][get]
warn
operation-tag-required
Each operation must declare at least one tag.
$.paths[*][get]
info
pagination-limit-required
List endpoints should accept a `limit` query parameter.
$.paths[*][get].parameters[?(@.in=='query')]
warn
path-id-required
Single-resource paths must declare an `id` path parameter.
$.paths[?(@property.match(/\{id\}$/))][get].parameters[?(@.in=='path' && @.name=='id')]
error
response-200-required
Each operation must declare a 200 response.
$.paths[*][get].responses
warn
response-description-required
Every response must declare a description.
$.paths[*][get].responses[*]
warn
response-content-required
200 responses must include an application/json schema.
$.paths[*][get].responses['200'].content
info
tags-defined
Spec must declare a tags collection at the root.
$
info
tags-title-case
Tag names should use Title Case.
$.tags[*].name
info
schemas-defined
Components.schemas must be defined.
$.components
info
named-api-resource-defined
NamedAPIResource is the canonical PokéAPI reference shape — define it.
$.components.schemas