StackHawk · API Governance Rules
StackHawk API Rules
Spectral linting rules defining API design standards and conventions for StackHawk.
7 Rules
error 3
warn 4
Rule Categories
stackhawk
Rules
error
stackhawk-operation-ids
All operations must have a camelCase operationId
$.paths[*][*]
error
stackhawk-tags-required
All operations must have at least one tag
$.paths[*][*]
warn
stackhawk-api-versioned-path
All StackHawk API paths should begin with /api/v1/ or /api/v2/
$.paths[*]~
warn
stackhawk-bearer-auth
Non-login operations must use BearerAuth
$.paths[*][*]
warn
stackhawk-org-id-param
Organization-scoped endpoints must use orgId path parameter
$.paths['/api/v1/org/{orgId}'][*].parameters[?(@.in=='path')]
error
stackhawk-successful-response
All operations must define at least one success response
$.paths[*][*].responses
warn
stackhawk-delete-returns-204
DELETE operations should return 204 No Content
$.paths[*].delete.responses