SaaSHub · API Governance Rules
SaaSHub API Rules
Spectral linting rules defining API design standards and conventions for SaaSHub.
12 Rules
error 2
warn 9
info 1
Rule Categories
no
saashub
schema
servers
Rules
warn
saashub-summary-title-case
All operation summaries must use Title Case
$.paths[*][*].summary
warn
saashub-tags-title-case
All tags must use Title Case
$.paths[*][*].tags[*]
error
saashub-api-key-required
API key query parameter must be present on all operations
$.paths[*][get]
warn
saashub-operation-ids-camel-case
Operation IDs must use camelCase
$.paths[*][*].operationId
warn
saashub-path-params-have-examples
Path parameters should include examples
$.paths[*][*].parameters[?(@.in == 'path')]
warn
saashub-responses-include-json
Successful responses must return application/json
$.paths[*][*].responses[?(@property.match(/^2/))]
warn
saashub-jsonapi-response-structure
Responses should follow JSON:API structure with data field
$.components.schemas[*]
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-expected-domain
Server URLs should be on the saashub.com domain.
$.servers[*].url
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
info
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description