Sound Transit · API Governance Rules
Sound Transit API Rules
Spectral linting rules defining API design standards and conventions for Sound Transit.
10 Rules
error 2
warn 7
info 1
Rule Categories
sound
Rules
error
sound-transit-api-key-required
All Sound Transit API operations require the 'key' query parameter
$.paths[*][get].parameters[?(@.name == 'key')]
warn
sound-transit-json-suffix
Sound Transit OneBusAway API paths use .json suffix
$.paths
warn
sound-transit-operation-summary-title-case
Operation summaries must use Title Case
$.paths[*][get,post,put,patch,delete].summary
error
sound-transit-operation-id-required
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
sound-transit-operation-id-camel-case
OperationId must use camelCase convention
$.paths[*][get,post,put,patch,delete].operationId
warn
sound-transit-operation-has-tags
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
warn
sound-transit-401-response
Operations must document 401 Unauthorized for invalid API key
$.paths[*][get,post,put,patch,delete].responses
warn
sound-transit-response-schema-defined
Successful responses must have a schema
$.paths[*][get].responses['200'].content['application/json']
warn
sound-transit-tags-title-case
All tags in the spec must use Title Case
$.tags[*].name
info
sound-transit-base-response-structure
All response schemas should reference BaseResponse or include code and currentTime fields
$.components.schemas.BaseResponse