TransportAPI · API Governance Rules
TransportAPI API Rules
Spectral linting rules defining API design standards and conventions for TransportAPI.
10 Rules
error 2
warn 4
info 1
Rule Categories
transportapi
Rules
warn
transportapi-operation-summary-title-case
All operation summaries must use Title Case
$.paths[*][*].summary
error
transportapi-operationid-required
All operations must have an operationId
$.paths[*][*]
warn
transportapi-tags-required
All operations must have tags
$.paths[*][*]
hint
transportapi-json-extension-in-paths
UK transport endpoints should end with .json extension
$.paths
error
transportapi-response-200-required
All GET operations must have a 200 response
$.paths[*].get.responses
warn
transportapi-app-auth-params
API authentication via app_id and app_key query parameters must be documented
$.components.securitySchemes
info
transportapi-uk-base-path
All paths should operate under UK data context
$.servers[*].url
hint
transportapi-atcocode-path-param
Bus stop path parameters should be named atcocode
$.paths[*][*].parameters[*][?(@.in=='path' && @.name=='station_stop')]
warn
transportapi-datetime-format
Date-time properties should use ISO 8601 format
$.components.schemas[*].properties[?(@.format=='date-time')]
hint
transportapi-pagination-limit
Collection endpoints should support limit parameter
$.paths[*].get.parameters[*][?(@.name=='limit')]