The Movie Database · API Governance Rules
The Movie Database API Rules
Spectral linting rules defining API design standards and conventions for The Movie Database.
42 Rules
error 16
warn 22
info 4
Rule Categories
tmdb
Rules
warn
tmdb-info-title-prefix
info.title should start with 'TMDB'.
$.info.title
error
tmdb-info-description-required
info.description is required and must be a substantive paragraph (>= 80 chars).
$.info
error
tmdb-info-version-required
info.version is required.
$.info
warn
tmdb-info-contact-required
info.contact should be defined with name and url.
$.info
warn
tmdb-info-license-required
info.license must be set (TMDB API Terms of Use).
$.info
error
tmdb-openapi-version
Spec must target OpenAPI 3.1.x.
$.openapi
error
tmdb-servers-defined
At least one server URL is required.
$.servers
error
tmdb-servers-https
Server URLs must use HTTPS.
$.servers[*].url
warn
tmdb-servers-host
Server URL should be https://api.themoviedb.org.
$.servers[*].url
error
tmdb-paths-version-prefix
Paths must start with /3/ (or /4/ for OAuth-list endpoints).
$.paths.*~
error
tmdb-paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths.*~
error
tmdb-paths-no-query-string
Paths must not contain a '?' (use parameters instead).
$.paths.*~
warn
tmdb-paths-snake-case
Path segments are snake_case alphanumerics (e.g. /watch/providers, /authentication/guest_session/new).
$.paths.*~
error
tmdb-operation-summary-required
Every operation must have a summary.
$.paths.*.[get,post,put,patch,delete]
warn
tmdb-operation-summary-tmdb-prefix
Operation summaries should start with 'TMDB '.
$.paths.*.[get,post,put,patch,delete].summary
warn
tmdb-operation-description-required
Every operation must have a description.
$.paths.*.[get,post,put,patch,delete]
error
tmdb-operation-id-required
Every operation must have an operationId.
$.paths.*.[get,post,put,patch,delete]
warn
tmdb-operation-id-kebab
operationId uses kebab-case (e.g. movie-details, account-add-favorite).
$.paths.*.[get,post,put,patch,delete].operationId
error
tmdb-operation-tags-required
Every operation must declare at least one tag.
$.paths.*.[get,post,put,patch,delete]
warn
tmdb-operation-microcks
Every operation should declare x-microcks-operation for mock-server compatibility.
$.paths.*.[get,post,put,patch,delete]
warn
tmdb-tags-defined
Global tags array must be declared so each operation tag is documented.
$
warn
tmdb-tags-description
Every global tag must have a description.
$.tags[*]
info
tmdb-tags-title-case
Tag names are Title Case (e.g. 'Movies', 'TV Series', 'Watch Providers').
$.tags[*].name
warn
tmdb-parameter-description
Parameters require a description.
$.paths.*.[get,post,put,patch,delete].parameters[*]
warn
tmdb-parameter-snake-case
Parameter names use snake_case (e.g. movie_id, language, api_key, append_to_response).
$.paths.*.[get,post,put,patch,delete].parameters[*].name
error
tmdb-parameter-schema-type
Parameter schemas must specify a type.
$.paths.*.[get,post,put,patch,delete].parameters[*]
info
tmdb-parameter-pagination
Pagination parameter is named 'page' (TMDB uses page-based pagination).
$.paths.*.[get,post,put,patch,delete].parameters[?(@.in == 'query' && (@.name == 'offset' || @.name == 'limit' || @.name == 'cursor'))]
error
tmdb-response-success
Every operation must define a 2xx success response.
$.paths.*.[get,post,put,patch,delete].responses
warn
tmdb-response-401
Operations should document a 401 response for auth failures.
$.paths.*.[get,post,put,patch,delete].responses
warn
tmdb-response-429
Operations should document 429 rate-limit responses.
$.paths.*.[get,post,put,patch,delete].responses
error
tmdb-response-json-content
Response content-type must be application/json.
$.paths.*.[get,post,put,patch,delete].responses.*.content
error
tmdb-response-description
Every response must have a description.
$.paths.*.[get,post,put,patch,delete].responses.*
warn
tmdb-schema-property-snake-case
Schema property names use snake_case (e.g. release_date, poster_path, vote_average).
$.components.schemas.*.properties.*~
info
tmdb-schema-title
Top-level schemas should declare a title.
$.components.schemas.*
warn
tmdb-schema-type
Schemas must declare a type.
$.components.schemas.*
warn
tmdb-security-global
A global security requirement should be set (bearerAuth or apiKeyAuth).
$.security
warn
tmdb-security-scheme-bearer
components.securitySchemes.bearerAuth must be declared for v4 token auth.
$.components.securitySchemes
warn
tmdb-security-scheme-apikey
components.securitySchemes.apiKeyAuth must be declared for v3 api_key auth.
$.components.securitySchemes
error
tmdb-get-no-request-body
GET operations must not declare a requestBody.
$.paths.*.get
warn
tmdb-delete-no-request-body
DELETE operations should not declare a requestBody.
$.paths.*.delete
warn
tmdb-no-empty-description
Descriptions must not be empty strings.
$..description
info
tmdb-examples-encouraged
JSON response media types should include named examples for mock-server compatibility.
$.paths.*.[get,post,put,patch,delete].responses.*.content.application/json