Clerk · API Governance Rules
Clerk API Rules
Spectral linting rules defining API design standards and conventions for Clerk.
9 Rules
error 2
warn 3
info 4
Rule Categories
clerk
Rules
warn
clerk-security-required
All non-health endpoints MUST declare bearer authentication.
$.paths[*][?(@property == 'get' || @property == 'post' || @property == 'patch' || @property == 'put' || @property == 'delete')]
error
clerk-operation-id-camel-case
operationId MUST be camelCase, matching Clerk SDK method naming.
$.paths[*][*].operationId
warn
clerk-summary-title-case
Operation summaries MUST be Title Case.
$.paths[*][?(@property == 'get' || @property == 'post' || @property == 'patch' || @property == 'put' || @property == 'delete')].summary
error
clerk-tags-required
Every operation MUST be tagged so it appears in the Clerk docs sidebar.
$.paths[*][?(@property == 'get' || @property == 'post' || @property == 'patch' || @property == 'put' || @property == 'delete')]
info
clerk-versioning-by-date
API version SHOULD be a release date (YYYY-MM-DD) per Clerk's date-based versioning.
$.info.version
info
clerk-id-prefix-convention
Resource identifier examples SHOULD use Clerk's prefixed-ID convention (user_, sess_, org_, etc.).
$.components.schemas[?(@property =~ /Id$/)].example
info
clerk-list-response-pagination
List-style responses SHOULD include total_count and data fields for cursor/offset pagination.
$.components.schemas[?(@property =~ /List$/)].properties
info
clerk-no-snake-case-in-summary
Operation summaries SHOULD NOT contain snake_case identifiers — those belong in descriptions, not headlines.
$.paths[*][*].summary
warn
clerk-deprecation-must-document
Deprecated operations MUST explain the replacement in the description.
$.paths[*][?(@.deprecated == true)]