TVmaze · API Governance Rules
TVmaze API Rules
Spectral linting rules defining API design standards and conventions for TVmaze.
14 Rules
error 4
warn 7
info 3
Rule Categories
components
info
operation
path
paths
premium
response
Rules
warn
operation-summary-title-case
Operation summaries should be in Title Case.
$.paths[*][get,post,put,delete,patch].summary
error
operation-id-required
Every operation must declare an operationId.
$.paths[*][get,post,put,delete,patch]
warn
operation-id-lower-camel
operationId should be lowerCamelCase.
$.paths[*][get,post,put,delete,patch].operationId
warn
operation-tags-required
Every operation must declare at least one tag.
$.paths[*][get,post,put,delete,patch]
error
paths-no-extension
Paths should not include a file extension.
$.paths[*]~
error
paths-no-trailing-slash
Paths should not end with a trailing slash.
$.paths[*]~
warn
path-segment-lowercase
Path segments should be lowercase, with no underscores.
$.paths[*]~
warn
path-id-integer
Path parameters named `id` (or `*_id`) should be integers.
$.paths[*].parameters[?(@.in=='path' && (@.name=='id' || @.name=~/_id$/))].schema
warn
response-json-required
2xx responses must offer application/json content.
$.paths[*][get,post,put,delete,patch].responses[?(@property.match(/^2/))]
info
response-rate-limit-documented
GET endpoints should document 429 because TVmaze rate-limits at 20 req / 10 sec / IP.
$.paths[*].get.responses
info
premium-paths-namespace
Premium endpoints should live under /v1/user, /v1/scrobble, or /v1/auth.
$.paths[*]~
error
info-license-required
info.license is required.
$.info
info
info-license-creative-commons
TVmaze data is CC BY-SA 4.0; the license field should reflect that.
$.info.license
warn
components-schemas-required
components.schemas should be defined so payloads are reusable.
$.components