sitecore · API Governance Rules
sitecore API Rules
Spectral linting rules defining API design standards and conventions for sitecore.
14 Rules
error 4
warn 6
info 4
Rule Categories
sitecore
Rules
warn
sitecore-operation-summary-title-case
All operation summaries must use Title Case
$.paths[*][*].summary
error
sitecore-operation-id-camel-case
Operation IDs must use camelCase
$.paths[*][*].operationId
warn
sitecore-path-kebab-case
Path segments must use kebab-case or camelCase (no underscores)
$.paths
error
sitecore-bearer-or-basic-auth
Security schemes must be Bearer token or Basic Auth (Sitecore standard)
$.components.securitySchemes[*]
warn
sitecore-response-200-has-schema
All 200 responses must define a schema
$.paths[*][*].responses['200'].content['application/json']
info
sitecore-400-uses-problem-details
400 error responses should reference a ProblemDetails or error schema
$.paths[*][*].responses['400']
warn
sitecore-tags-must-match-defined
Operation tags must correspond to tags defined in the root tags array
$.paths[*][*].tags[*]
info
sitecore-versioned-path
API paths should include a version prefix (/v1/, /v2.1/, /authoring/)
$.paths
error
sitecore-no-trailing-slash
Paths must not end with a trailing slash
$.paths
warn
sitecore-post-has-request-body
POST operations that create or update resources must have a request body
$.paths[*].post
info
sitecore-delete-returns-204
DELETE operations should return 204 No Content on success
$.paths[*].delete.responses
info
sitecore-list-operations-paginated
List operations should support pagination parameters
$.paths[*].get
warn
sitecore-info-contact-defined
The info section must include a contact object
$.info
error
sitecore-servers-defined
At least one server must be defined
$