Tropic · API Governance Rules
Tropic API Rules
Spectral linting rules defining API design standards and conventions for Tropic.
10 Rules
error 4
warn 4
Rule Categories
tropic
Rules
warn
tropic-operation-summary-title-case
Operation summaries must use Title Case
$.paths[*][*].summary
error
tropic-operation-tags-required
All operations must have at least one tag
$.paths[*][*]
warn
tropic-path-versioned
All paths must be versioned with /v1/ prefix
$.paths[*]~
error
tropic-response-success-defined
All operations must have a 2xx success response
$.paths[*][get,post,put,patch,delete]
hint
tropic-ids-as-path-params
Resource IDs should be path parameters named {id}
$.paths[*]~
warn
tropic-pagination-params
GET collection endpoints should support page and per_page parameters
$.paths[*][get].parameters[*].name
error
tropic-request-body-required
POST and PUT operations must define a requestBody
$.paths[*][post,put]
error
tropic-bearer-auth-only
Only Bearer authentication should be used
$.components.securitySchemes.*
warn
tropic-error-response-shape
Error responses should include an error field
$.paths[*][*].responses[4*,5*].content.application/json.schema.properties
hint
tropic-timestamps-iso8601
Timestamp fields should use date-time format
$.components.schemas[*].properties[created_at,updated_at,approved_at]