CloudZero · API Governance Rules
CloudZero API Rules
Spectral linting rules defining API design standards and conventions for CloudZero.
12 Rules
error 4
warn 7
info 1
Rule Categories
cloudzero
Rules
error
cloudzero-info-contact
API contact information must be present.
$.info
warn
cloudzero-info-license
API license must be declared.
$.info
error
cloudzero-server-https
All server URLs must use HTTPS.
$.servers[*].url
warn
cloudzero-server-host
Server URL must reference api.cloudzero.com.
$.servers[*].url
error
cloudzero-api-key-auth
An apiKey security scheme must be defined.
$.components.securitySchemes
warn
cloudzero-operation-tags
Every operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
cloudzero-operation-summary
Every operation must include a short summary.
$.paths[*][get,post,put,patch,delete]
error
cloudzero-operation-id
Every operation must declare a unique operationId.
$.paths[*][get,post,put,patch,delete]
warn
cloudzero-error-responses
Mutating operations should declare 4xx error responses.
$.paths[*][post,put,patch,delete].responses
info
cloudzero-pagination-page
List endpoints should accept page and page_size query parameters.
$.paths[?(@property.match(/insights$|budgets$|costs$|dimensions$/))].get.parameters[*].name
warn
cloudzero-iso-date
Date parameters and properties should use ISO 8601 (date or date-time).
$..[?(@property === 'start_date' || @property === 'end_date')].schema
warn
cloudzero-currency-iso
Currency fields should use ISO 4217 codes.
$..[?(@property === 'currency')].schema