ColorfulClouds · API Governance Rules
ColorfulClouds API Rules
Spectral linting rules defining API design standards and conventions for ColorfulClouds.
39 Rules
error 12
warn 22
info 5
Authorship not recorded
No authorship marker is recorded for this file. It is not presented as the provider's; it was most likely written by an API Evangelist pass before outputs were stamped.
Rule Categories
caiyun
examples
get
info
no
openapi
operation
parameter
paths
response
schema
security
servers
tags
Rules
error
info-title-required
API title must be present and start with the provider prefix.
$.info
warn
info-description-min-length
API description must be present and detailed (>= 80 chars).
$.info
error
info-version-required
API version must be present.
$.info
warn
info-contact-required
Contact object must be present with a URL.
$.info.contact
error
openapi-version-3
Spec must target OpenAPI 3.x.
$.openapi
error
servers-required
Servers array must be defined.
$
error
servers-https-only
All server URLs must use HTTPS.
$.servers[*]
warn
servers-canonical-host
Servers should target api.caiyunapp.com.
$.servers[*]
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths
warn
paths-lowercase
Path segments must be lowercase (kebab-case allowed).
$.paths
warn
paths-token-in-path
Caiyun encodes the API token as a path segment. Forecast paths must include the {token} parameter immediately after the version prefix.
$.paths
error
operation-operationId-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-operationId-camel
operationId must be camelCase.
$.paths[*][get,post,put,patch,delete]
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-prefix
Summaries must begin with "Caiyun Weather".
$.paths[*][get,post,put,patch,delete]
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
warn
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 parity.
$.paths[*][get,post,put,patch,delete]
warn
tags-global-defined
Global tags array must be defined with descriptions.
$
warn
tags-title-case
Global tag names must use Title Case (no kebab, no snake).
$.tags[*]
info
tags-description-required
Global tags must have descriptions.
$.tags[*]
warn
parameter-description-required
Every parameter must have a description.
$..parameters[*]
warn
parameter-snake-case
Query and path parameters must use snake_case (lng, lat, dailysteps, hourlysteps, alert, begin, granu).
$..parameters[?(@.in == 'query')]
error
parameter-schema-required
Every parameter must declare a schema with a type.
$..parameters[*]
error
response-2xx-required
Each operation must declare at least one 2xx response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-401-on-token-paths
Token-bearing endpoints should document 401 Unauthorized responses.
$.paths[?(@property.match(/\{token\}/))][get].responses
warn
response-429-on-token-paths
Token-bearing endpoints should document 429 Too Many Requests responses.
$.paths[?(@property.match(/\{token\}/))][get].responses
warn
response-description-required
Every response object must have a description.
$.paths[*][get,post,put,patch,delete].responses[*]
info
response-json-content
Successful responses should be application/json (except precipitation map tiles).
$.paths[?(!@property.match(/precipitation/))][get].responses.200.content
warn
schema-property-snake-case
Schema property names must use snake_case to match Caiyun's JSON wire format (precipitation_2h, apparent_temperature, life_index, air_quality, cloudrate, dswrf, etc.). Exemptions are made for life-index sub-keys that ship in camelCase from the upstream API (carWashing, coldRisk).
$.components.schemas[*].properties
warn
schema-type-required
Top-level schemas must declare a type.
$.components.schemas[*]
info
schema-description-required
Top-level schemas should carry a description.
$.components.schemas[*]
warn
schema-skycon-enum
SkyCon enum must include the canonical Caiyun phenomena.
$.components.schemas.SkyCon
warn
security-defined
Global security must be declared.
$
error
security-schemes-defined
Security schemes must be defined.
$.components.securitySchemes
error
get-no-request-body
GET operations must not declare a request body.
$.paths[*].get
warn
caiyun-get-only-api
The Caiyun Weather API is read-only — operations should use GET.
$.paths[*]
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description
info
examples-on-parameters
Parameters should carry an example value.
$..parameters[*]
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.