Trelica · API Governance Rules
Trelica API Rules
Spectral linting rules defining API design standards and conventions for Trelica.
21 Rules
error 3
warn 13
info 5
Rule Categories
no
path
query
schema
security
servers
trelica
Rules
warn
trelica-operation-id-camel-case
Operation IDs must use camelCase
$.paths[*][*].operationId
warn
trelica-operation-summary-title-case
Operation summaries must use Title Case
$.paths[*][*].summary
info
trelica-pagination-cursor-pattern
List operations should support cursor-based pagination with 'after' parameter
$.paths[*].get
info
trelica-limit-parameter
List operations should include a limit parameter
$.paths[*].get.parameters[*]
error
trelica-security-defined
All operations must define security requirements
$.paths[*][get,post,put,patch,delete]
error
trelica-response-200-defined
All GET operations must define a 200 response
$.paths[*].get
warn
trelica-response-401-defined
Operations using OAuth must define a 401 response
$.paths[*][get,post,put,patch,delete]
warn
trelica-tag-defined
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
warn
trelica-path-kebab-case
API paths must use kebab-case
$.paths[*]~
warn
trelica-versioned-paths
API paths should include a version segment (v1, v2, etc.)
$.paths[*]~
info
trelica-scim-users-separate-pagination
SCIM endpoints use startIndex/count pagination, not cursor-based
$.paths['/scim/v2/Users'].get
warn
trelica-request-body-post
POST operations should define a request body
$.paths[*].post
info
trelica-since-filter-datetime
The 'since' filter parameter should be ISO 8601 date-time format
$.paths[*][*].parameters[?(@.name=='since')].schema
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-expected-domain
Server URLs should be on the trelica.com domain.
$.servers[*].url
warn
path-params-casing
Path parameters should be camelCase (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
query-params-casing
Query parameters should be snake_case (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
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
security-schemes-defined
Security schemes should be defined in components.
$.components
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description