The New York Times · API Governance Rules
The New York Times API Rules
Spectral linting rules defining API design standards and conventions for The New York Times.
12 Rules
error 3
warn 7
Rule Categories
nyt
Rules
warn
nyt-api-key-security-scheme
All NYT API operations must reference an apiKey security scheme named api-key or apikey.
$.paths.*.*
warn
nyt-operation-summary-title-case
Operation summaries must use Title Case.
$.paths.*.*.summary
error
nyt-operation-summary-exists
All NYT API operations must have a summary field.
$.paths.*.*
warn
nyt-operation-tags-exist
All NYT API operations must have at least one tag.
$.paths.*.*
error
nyt-response-200-exists
All NYT API operations must define a 200 success response.
$.paths.*.*.responses
warn
nyt-response-json-content
200 responses should return application/json content.
$.paths.*.*.responses.200.content
hint
nyt-path-json-suffix
NYT API paths must end with the .json format suffix.
$.paths
error
nyt-info-title-exists
API info title must be set.
$.info
warn
nyt-info-description-exists
API info description should describe the API.
$.info
warn
nyt-server-https
NYT API server URLs should use HTTPS.
$.servers[*].url
warn
nyt-parameter-description-exists
All parameters should include a description.
$.paths.*.*.parameters[*]
hint
nyt-components-schemas-reuse
Reusable schemas should be defined under components/schemas.
$.components.schemas