SuperTokens · API Governance Rules
SuperTokens API Rules
Spectral linting rules defining API design standards and conventions for SuperTokens.
10 Rules
error 5
warn 5
Rule Categories
supertokens
Rules
error
supertokens-operation-id-required
All SuperTokens CDI operations must have an operationId
$.paths[*][*]
warn
supertokens-summary-title-case
Operation summaries must use Title Case
$.paths[*][*].summary
warn
supertokens-tags-required
All operations must have at least one tag
$.paths[*][*]
warn
supertokens-status-in-response
All 200 response bodies should contain a status field for error handling
$.paths[*][*].responses.200.content.application/json.schema.properties
error
supertokens-api-key-security
CDI API must define api-key security scheme
$.components.securitySchemes
error
supertokens-request-body-for-post
POST operations must have a request body
$.paths[*].post
error
supertokens-request-body-for-put
PUT operations must have a request body
$.paths[*].put
warn
supertokens-tenant-id-described
tenantId parameters should have a description
$.paths[*][*].parameters[?(@.name == 'tenantId')]
error
supertokens-user-schema-required
User schema must include id and timeJoined fields
$.components.schemas.User.properties
warn
supertokens-error-response-defined
401 error responses should be defined for session endpoints
$.paths['/recipe/session'].get.responses