Tomorrow.io · API Governance Rules
Tomorrow.io API Rules
Spectral linting rules defining API design standards and conventions for Tomorrow.io.
42 Rules
error 19
warn 22
info 1
Rule Categories
delete
global
info
no
openapi
operation
parameter
path
post
request
response
schema
security
server
tag
Rules
error
info-title-tomorrow-prefix
API title must start with "Tomorrow.io".
$.info.title
error
info-description-required
API info.description is required and substantive.
$.info
error
info-version-required
API info.version is required.
$.info
warn
info-contact-required
API info.contact should be populated.
$.info
warn
info-license-required
API info.license should be populated.
$.info
error
openapi-version-3
OpenAPI version must be 3.0.x.
$.openapi
error
server-https-required
All server URLs must be HTTPS.
$.servers[*].url
warn
server-tomorrow-host
Servers should point at api.tomorrow.io.
$.servers[*].url
error
path-no-trailing-slash
Paths must not end with a trailing slash.
$.paths.*~
error
path-no-query-string
Paths must not contain a query string.
$.paths.*~
warn
path-kebab-case-segments
Path segments should be kebab-case (lowercase + hyphens). Path params are exempt.
$.paths.*~
error
operation-operationId-required
Every operation must have an operationId.
$.paths.*[get,post,put,patch,delete]
error
operation-operationId-camelcase
operationId must be camelCase.
$.paths.*[get,post,put,patch,delete].operationId
error
operation-summary-required
Every operation must have a summary.
$.paths.*[get,post,put,patch,delete]
warn
operation-summary-tomorrow-prefix
Operation summaries must start with "Tomorrow.io ".
$.paths.*[get,post,put,patch,delete].summary
warn
operation-description-required
Every operation should have a description.
$.paths.*[get,post,put,patch,delete]
error
operation-tags-required
Every operation must declare at least one tag.
$.paths.*[get,post,put,patch,delete]
info
operation-microcks-extension
Each operation should declare x-microcks-operation for mock compatibility.
$.paths.*[get,post,put,patch,delete]
warn
global-tags-defined
A global tags array must be defined.
$
warn
tag-description-required
Each tag should carry a description.
$.tags[*]
warn
tag-title-case
Tag names should be Title Case.
$.tags[*].name
warn
parameter-description-required
Every parameter should have a description.
$.paths.*[get,post,put,patch,delete].parameters[*]
error
parameter-schema-required
Every parameter must declare a schema with a type.
$.paths.*[get,post,put,patch,delete].parameters[*]
warn
parameter-camelcase
Parameter names should be camelCase (matches Tomorrow.io v4 convention).
$.paths.*[get,post,put,patch,delete].parameters[*].name
warn
parameter-api-key-not-in-query-public
Avoid taking API keys as ordinary parameters — declare them as a securityScheme.
$.paths.*[get,post,put,patch,delete].parameters[?(@.name=="apikey" || @.name=="api_key")]
error
request-body-json-content
Request bodies must declare application/json content.
$.paths.*[get,post,put,patch,delete].requestBody.content
error
response-success-required
Each operation must declare at least one 2xx response.
$.paths.*[get,post,put,patch,delete].responses
warn
response-401-on-writes
Write operations should document a 401 Unauthorized response.
$.paths.*[post,put,patch,delete].responses
warn
response-429-rate-limit
Operations should document a 429 Too Many Requests response.
$.paths.*[get,post,put,patch,delete].responses
error
response-description-required
Every response must have a description.
$.paths.*[get,post,put,patch,delete].responses.*
warn
schema-property-camelcase
Schema properties should be camelCase.
$.components.schemas.*.properties.*~
error
schema-property-type-required
Schema properties must declare a type or $ref.
$.components.schemas.*.properties.*
warn
schema-object-description
Top-level component schemas should carry a description.
$.components.schemas.*
warn
schema-error-shape
Error schema should expose code, type, and message fields (Tomorrow.io error envelope).
$.components.schemas.Error
error
security-defined
A global security requirement must be defined.
$
error
security-scheme-defined
securitySchemes must include the Tomorrow.io apikey query scheme.
$.components.securitySchemes
warn
security-apikey-query-name
API key parameter name should be `apikey` to match Tomorrow.io conventions.
$.components.securitySchemes.apiKeyQuery
error
no-get-request-body
GET operations must not declare a requestBody.
$.paths.*.get
warn
no-delete-request-body
DELETE operations should not declare a requestBody.
$.paths.*.delete
warn
post-put-request-body
POST/PUT/PATCH operations must declare a requestBody.
$.paths.*[post,put,patch]
warn
delete-returns-204
DELETE operations should return 204 No Content on success.
$.paths.*.delete.responses
warn
no-empty-descriptions
Descriptions should not be empty strings.
$..description