Sorsa · API Governance Rules
Sorsa API Rules
Spectral linting rules defining API design standards and conventions for Sorsa.
8 Rules
error 5
warn 2
Rule Categories
sorsa
Rules
error
sorsa-paths-are-lowercase-kebab
Paths must be lowercase kebab-case (e.g. /tweet-info, /check-follow). Underscores and camelCase are not permitted.
$.paths.*~
error
sorsa-operations-have-summary
Every operation must declare a human-readable summary in Title Case.
$.paths.*[get,post,put,delete,patch]
error
sorsa-operations-have-tags
Every operation must declare at least one tag drawn from the canonical tag taxonomy.
$.paths.*[get,post,put,delete,patch]
warn
sorsa-operations-have-operationId
Every operation should declare a stable operationId for SDK generation.
$.paths.*[get,post,put,delete,patch]
error
sorsa-auth-is-apikey-header
Sorsa uses a single `ApiKey` header. The OpenAPI spec must declare exactly that security scheme.
$.components.securitySchemes.ApiKey
error
sorsa-uses-canonical-server
The spec must declare https://api.sorsa.io/v3 as a server.
$.servers[*].url
warn
sorsa-error-responses-defined
Operations should document at minimum 400, 401, 429 responses.
$.paths.*[get,post,put,delete,patch].responses
hint
sorsa-pagination-uses-next-cursor
Paginated list responses should expose a `next_cursor` field (Sorsa convention).
$.components.schemas[?(@property.match(/.*Response$/i))].properties