Tratta · API Governance Rules
Tratta API Rules
Spectral linting rules defining API design standards and conventions for Tratta.
12 Rules
error 4
warn 8
Rule Categories
tratta
Rules
warn
tratta-operation-summary-title-case
All operation summaries must use Title Case
$.paths[*][*].summary
error
tratta-operationid-required
All operations must have an operationId
$.paths[*][*]
warn
tratta-operationid-verb-noun
OperationIds should start with a verb (list, get, create, update, delete)
$.paths[*][*].operationId
warn
tratta-tags-required
All operations must have tags
$.paths[*][*]
error
tratta-bearer-auth-required
API must use bearer authentication
$.components.securitySchemes[*]
warn
tratta-org-uuid-in-server
Server URL must include organization UUID variable
$.servers[*].url
warn
tratta-response-201-for-post
POST operations should return 201 Created
$.paths[*].post.responses
error
tratta-response-200-for-get
GET operations must return 200 OK
$.paths[*].get.responses
warn
tratta-pagination-params
List endpoints should support limit and page parameters
$.paths[*].get
warn
tratta-data-wrapper
Responses should wrap data in a data property
$.components.schemas[?(@property.match(/Response$/))].properties
error
tratta-request-body-json
POST and PUT request bodies should use application/json
$.paths[*][post,put].requestBody.content
warn
tratta-snake-case-parameters
Query parameter names should use snake_case
$.paths[*][*].parameters[*][?(@.in=='query')].name