Secure Code Warrior · API Governance Rules
Secure Code Warrior API Rules
Spectral linting rules defining API design standards and conventions for Secure Code Warrior.
10 Rules
error 2
warn 6
info 2
Rule Categories
scw
Rules
warn
scw-operation-ids-camel-case
Operation IDs must use camelCase
$.paths[*][*].operationId
error
scw-tags-required
All operations must have at least one tag
$.paths[*][*]
warn
scw-summaries-title-case
Operation summaries must use Title Case
$.paths[*][*].summary
error
scw-api-key-auth
All operations must require X-API-Key authentication
$.paths[*][*]
warn
scw-pagination-support
List/reporting endpoints should support page parameter
$.paths[*][get].parameters
warn
scw-delete-returns-204
DELETE operations should return 204 No Content
$.paths[*][delete].responses
warn
scw-post-create-returns-201
POST create operations should return 201 Created
$.paths[*][post].responses
info
scw-patch-partial-update
Partial updates should use PATCH not PUT
$.paths[*]
info
scw-search-endpoints-post
Search/filter endpoints should use POST with body filters
$.paths[~/search$][*]
warn
scw-date-params-iso8601
Date parameters should use ISO 8601 format
$.paths[*][*].parameters[?(@.name =~ /date|Date/)].schema