Sonar · API Governance Rules
Sonar API Rules
Spectral linting rules defining API design standards and conventions for Sonar.
8 Rules
error 2
warn 4
info 2
Rule Categories
sonar
Rules
warn
sonar-operation-summary-title-case
All operation summaries must use Title Case
$.paths[*][*].summary
error
sonar-operation-id-required
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
sonar-tags-required
All operations must have tags
$.paths[*][get,post,put,patch,delete]
info
sonar-organization-param-required
SonarCloud organization-scoped endpoints should include organization parameter
$.paths[*].get.parameters[*].name
error
sonar-200-get-response
GET operations must define 200 response
$.paths[*].get.responses
warn
sonar-bearer-auth
All protected endpoints must use bearerAuth security scheme
$.paths[*][get,post,put,patch,delete]
warn
sonar-response-schema
Successful GET responses must include schemas
$.paths[*].get.responses[200].content
info
sonar-pagination-support
Search/list endpoints should support standard p and ps pagination
$.paths[*search*].get.parameters[*].name