Cloudsmith · API Governance Rules
Cloudsmith API Rules
Spectral linting rules defining API design standards and conventions for Cloudsmith.
14 Rules
error 4
warn 5
info 5
Rule Categories
cloudsmith
Rules
error
cloudsmith-info-contact
API contact information must be present.
$.info
warn
cloudsmith-info-license
API license must be declared.
$.info
error
cloudsmith-server-https
All server URLs must use HTTPS.
$.servers[*].url
warn
cloudsmith-host
Cloudsmith APIs must be served from api.cloudsmith.io.
$.servers[*].url
error
cloudsmith-auth-required
A security scheme must be declared (token-based apiKey).
$.components.securitySchemes
info
cloudsmith-token-prefix
API key descriptions should mention the "token" Authorization prefix.
$.components.securitySchemes[*]
error
cloudsmith-operation-id
Every operation must declare a unique operationId.
$.paths[*][get,post,put,patch,delete]
warn
cloudsmith-operation-summary
Every operation must include a short summary.
$.paths[*][get,post,put,patch,delete]
warn
cloudsmith-operation-tags
Every operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
info
cloudsmith-known-tags
Operations should use known Cloudsmith tag groups.
$.paths[*][get,post,put,patch,delete].tags[*]
info
cloudsmith-pagination
List endpoints should support page/page_size pagination params.
$.paths[?(@property.match(/\/$/))].get.parameters[*].name
info
cloudsmith-owner-param
Owner-scoped paths should declare the {owner} path param.
$.paths[?(@property.match(/\{owner\}/))][*].parameters[?(@.in == 'path')].name
warn
cloudsmith-error-responses
Mutating operations should declare 4xx error responses.
$.paths[*][post,put,patch,delete].responses
info
cloudsmith-rate-limit
Rate-limited endpoints should document a 429 response.
$.paths[*][get,post,put,patch,delete].responses