TravelCenters of America · API Governance Rules
TravelCenters of America API Rules
Spectral linting rules defining API design standards and conventions for TravelCenters of America.
10 Rules
error 3
warn 4
Rule Categories
ta
Rules
warn
ta-operation-summary-title-case
All operation summaries must use Title Case
$.paths[*][*].summary
error
ta-operationid-required
All operations must have an operationId
$.paths[*][*]
warn
ta-tags-required
All operations must have tags
$.paths[*][*]
error
ta-api-key-auth
API must use API key authentication
$.components.securitySchemes[*]
error
ta-response-200-required
GET operations must have a 200 response
$.paths[*].get.responses
hint
ta-location-id-param
Location-based queries should use location_id parameter consistently
$.paths[*][*].parameters[*][?(@.name=='location_id')]
warn
ta-kebab-case-paths
URL paths should use kebab-case for multi-word segments
$.paths
warn
ta-data-wrapper
Responses should wrap data in a data property
$.components.schemas[?(@property.match(/Response$/))].properties
hint
ta-timestamp-responses
Availability responses should include a timestamp field
$.components.schemas[?(@property.match(/Availability$/))].properties
hint
ta-pagination-for-lists
List responses should include a total count
$.components.schemas[?(@property.match(/ListResponse$/))].properties