Transit · API Governance Rules
Transit API Rules
Spectral linting rules defining API design standards and conventions for Transit.
9 Rules
error 2
warn 5
Rule Categories
transit
Rules
warn
transit-operation-summary-title-case
All operation summaries must use Title Case
$.paths[*][*].summary
error
transit-operationid-required
All operations must have an operationId
$.paths[*][*]
warn
transit-operationid-kebab-case
OperationIds should use camelCase
$.paths[*][*].operationId
warn
transit-tags-required
All operations must have tags
$.paths[*][*]
warn
transit-coordinates-lat-lon
Latitude and longitude parameters should be named lat and lon
$.paths[*][*].parameters[*].name
error
transit-response-200-required
All GET operations must have a 200 response
$.paths[*].get.responses
warn
transit-api-key-auth
API must use apiKey authentication
$.components.securitySchemes[*]
hint
transit-stop-codes-plural
Stop code query parameters should use plural form stop_codes
$.paths[*][*].parameters[*][?(@.in=='query' && @.name=='stop_code')]
hint
transit-pagination-limit-param
Collection endpoints should support limit parameter for pagination
$.paths[*].get.parameters[*][?(@.name=='max_departures' || @.name=='limit')]