Tripleseat · API Governance Rules
Tripleseat API Rules
Spectral linting rules defining API design standards and conventions for Tripleseat.
39 Rules
error 7
warn 26
info 6
Rule Categories
error
examples
get
info
no
openapi
operation
parameter
path
paths
post
query
request
response
schema
security
servers
tag
tags
Rules
warn
info-title-prefix
API title should start with "Tripleseat".
$.info.title
warn
info-description-required
API must have a description of at least 40 characters.
$.info
warn
info-contact-required
API must declare a contact.
$.info
warn
openapi-version-31
Specs should target OpenAPI 3.1.0.
$.openapi
error
servers-defined
At least one server must be defined.
$.servers
error
servers-https
Servers must use HTTPS.
$.servers[*].url
info
servers-tripleseat-host
Production server should be api.tripleseat.com.
$.servers[*].url
warn
paths-version-prefix
Paths should be versioned under /v1.
$.paths[*]~
warn
paths-snake-case
Path segments should be lowercase snake_case (allowing path params and .json suffix).
$.paths[*]~
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-title-case
Operation summaries should be in Title Case.
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
error
operation-id-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-id-camel-case-verb
operationId should be camelCase and start with a verb (get/list/create/update/delete/search).
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-tags-required
Every operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
info
tags-global-defined
A global tags array should be defined.
$
warn
tag-description-required
Each global tag should have a description.
$.tags[*]
warn
tag-title-case
Tag names should be in Title Case.
$.tags[*].name
warn
parameter-description-required
Every parameter should have a description.
$.paths[*][*].parameters[*]
warn
parameter-snake-case
Parameter names should be snake_case.
$.paths[*][*].parameters[*].name
info
parameter-pagination-page
Pagination should use the page parameter.
$.paths[*][*].parameters[?(@.in=='query' && (@.name=='offset' || @.name=='limit' || @.name=='cursor'))]
warn
request-body-json
Request bodies should support application/json.
$.paths[*][post,put,patch].requestBody.content
error
response-success-defined
Each operation must define a 2xx response.
$.paths[*][get,post,put,patch,delete].responses
info
response-unauthorized-defined
Operations should define a 401 response.
$.paths[*][get,post,put,patch,delete].responses
warn
error-schema-message
The Error schema should expose an error field.
$.components.schemas.Error.properties
warn
schema-property-snake-case
Schema property names should be snake_case (X-Signature header is exempt).
$.components.schemas[*].properties[*]~
info
schema-id-integer
id properties should be typed as integer.
$.components.schemas[*].properties.id
warn
security-global-defined
A global security requirement should be defined.
$
warn
security-oauth2-scheme
An oauth2 security scheme should be defined.
$.components.securitySchemes
error
get-no-request-body
GET operations must not declare a request body.
$.paths[*].get
warn
post-put-request-body
POST and PUT operations should declare a request body.
$.paths[*][post,put]
info
examples-encouraged
Operations are encouraged to provide response examples.
$.paths[*][get,post,put,patch,delete].responses[*].content.application/json
warn
path-params-casing
Path parameters should be snake_case (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
warn
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
error-schema-defined
A shared error schema (Error) should be defined for error payloads.
$.components.schemas
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description