Stytch · API Governance Rules
Stytch API Rules
Spectral linting rules defining API design standards and conventions for Stytch.
14 Rules
error 4
warn 6
Rule Categories
stytch
Rules
warn
stytch-info-contact
API info must declare a contact pointing at Stytch docs.
$.info
error
stytch-servers-defined
API must declare api.stytch.com (production) and test.stytch.com (test) servers.
$
error
stytch-server-https
All Stytch API servers must use HTTPS.
$.servers[*].url
error
stytch-operation-id-required
Every operation must declare an operationId.
$.paths[*][get,post,put,patch,delete]
warn
stytch-operation-id-camel-case
operationIds use camelCase (no underscores or hyphens).
$.paths[*][get,post,put,patch,delete].operationId
hint
stytch-summary-title-case
Operation summary should use Title Case.
$.paths[*][get,post,put,patch,delete].summary
warn
stytch-tags-required
Every operation must include at least one tag.
$.paths[*][get,post,put,patch,delete]
hint
stytch-description-required
Operations should include a description.
$.paths[*][get,post,put,patch,delete]
warn
stytch-200-response
All operations must define a 200 response.
$.paths[*][get,post,put,patch,delete].responses
warn
stytch-no-trailing-slash
API paths must not end with a trailing slash.
$.paths
hint
stytch-snake-case-fields
Stytch JSON fields are snake_case (no camelCase top-level properties).
$.components.schemas[*].properties
warn
stytch-request-body-for-post
POST operations should define a requestBody.
$.paths[*].post
error
stytch-auth-basic-or-bearer
APIs must declare HTTP Basic (project + secret) or Bearer security.
$.components.securitySchemes
hint
stytch-status-code-in-response
Standard Stytch responses include a top-level status_code integer.
$.components.schemas[?(@.type=='object' && @.properties)].properties