Travelers · API Governance Rules
Travelers API Rules
Spectral linting rules defining API design standards and conventions for Travelers.
11 Rules
error 2
warn 7
Rule Categories
travelers
Rules
warn
travelers-operation-summary-title-case
All operation summaries must use Title Case
$.paths[*][*].summary
error
travelers-operationid-required
All operations must have an operationId
$.paths[*][*]
warn
travelers-tags-required
All operations must have tags
$.paths[*][*]
warn
travelers-oauth2-required
Insurance API should use OAuth2 authentication
$.components.securitySchemes[*]
error
travelers-response-200-get
GET operations must have a 200 response
$.paths[*].get.responses
warn
travelers-response-201-post
POST operations that create resources should return 201
$.paths[*].post.responses
hint
travelers-claim-number-in-path
Claim endpoints should use claim_number as path parameter
$.paths['/claims/{claim_number}'][*].parameters[*][?(@.name=='id')]
warn
travelers-policy-type-enum
Policy types should be validated against known types
$.components.schemas[*].properties.policy_type
warn
travelers-date-format
Date fields should use ISO 8601 date format
$.components.schemas[*].properties[?(@.format=='date')]
warn
travelers-data-wrapper
Responses should wrap content in a data property
$.components.schemas[?(@property.match(/Response$/))].properties
hint
travelers-amount-format
Monetary amount fields should use number format float
$.components.schemas[*].properties[?(@.property.match(/amount|premium|incurred/i))]