REST Countries · API Governance Rules
REST Countries API Rules
Spectral linting rules defining API design standards and conventions for REST Countries.
9 Rules
error 4
warn 4
info 1
Rule Categories
rc
Rules
error
rc-info-title
API title must mention REST Countries.
$.info.title
warn
rc-server-base-url
Servers must reference https://restcountries.com/v3.1.
$.servers[*].url
warn
rc-no-auth
REST Countries is an unauthenticated public API; no security schemes should be required.
$.security
error
rc-operation-id
Every operation must define an operationId.
$.paths.*.get
error
rc-operation-tags
Every operation must define at least one tag.
$.paths.*.get
warn
rc-title-case-summary
Operation summaries should be Title Case (each major word capitalized).
$.paths.*.get.summary
info
rc-fields-parameter
GET operations should accept the `fields` query parameter for partial responses.
$.paths.*.get.parameters[?(@.name == 'fields')]
warn
rc-404-response
Lookup endpoints should document a 404 response.
$.paths[?(@property != '/all' && @property != '/independent')].get.responses
error
rc-country-schema-required
Spec must define the Country schema.
$.components.schemas