Toyota · API Governance Rules
Toyota API Rules
Spectral linting rules defining API design standards and conventions for Toyota.
18 Rules
error 4
warn 12
info 2
Rule Categories
error
no
path
query
schema
security
servers
toyota
Rules
warn
toyota-operation-id-camel-case
Operation IDs must use camelCase
$.paths[*][*].operationId
warn
toyota-operation-summary-title-case
Operation summaries must use Title Case
$.paths[*][*].summary
warn
toyota-paths-kebab-case
API paths must use kebab-case
$.paths[*]~
error
toyota-must-have-tags
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
warn
toyota-vin-path-parameter
VIN path parameters should have proper length constraints
$.paths[*][*].parameters[?(@.name == 'vin' && @.in == 'path')]
error
toyota-must-have-200-or-201
All operations must define a success response
$.paths[*][get,post,put,patch,delete].responses
warn
toyota-pagination-on-list-operations
List operations should support pagination parameters
$.paths[*][get][?(@.operationId =~ /^list/)]
error
toyota-vehicle-endpoints-auth
All vehicle endpoints must require authentication
$.paths[/vehicles*][get,post,put,patch,delete]
warn
toyota-coordinates-format
Latitude and longitude fields should use double format
$.components.schemas[*].properties[latitude,longitude]
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-expected-domain
Server URLs should be on the toyota.com domain.
$.servers[*].url
warn
path-params-casing
Path parameters should be snake_case (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
info
query-params-casing
Query parameters should be snake_case (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
info
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
security-schemes-defined
Security schemes should be defined in components.
$.components
warn
error-schema-defined
A shared error schema (Error) should be defined for error payloads.
$.components.schemas
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description