doordash · API Governance Rules
doordash API Rules
Spectral linting rules defining API design standards and conventions for doordash.
42 Rules
error 7
warn 27
info 8
Rule Categories
delete
error
get
global
info
no
openapi
operation
parameter
path
request
response
schema
security
server
servers
tag
Rules
warn
info-title-doordash-prefix
API title should start with "DoorDash".
$.info.title
warn
info-description-required
A meaningful info.description is required (min 40 chars).
$.info
warn
info-description-length
info.description should be substantive.
$.info.description
error
info-version-required
info.version is required.
$.info
info
info-contact-required
info.contact should be present.
$.info
warn
openapi-version-3-1
DoorDash specs target OpenAPI 3.1.0.
$.openapi
error
servers-defined
At least one server must be defined.
$
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
info
server-description-required
Each server should have a description.
$.servers[*]
warn
path-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
warn
path-segments-snake-case
Static path segments should be snake_case (lowercase letters, digits, underscores).
$.paths[*]~
error
path-no-query-string
Path keys must not contain query strings.
$.paths[*]~
error
operation-operationId-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-operationId-camel-case
operationId should be camelCase with a verb prefix.
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-doordash-prefix
Operation summaries should start with "DoorDash".
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
warn
operation-tags-required
Every operation must be tagged.
$.paths[*][get,post,put,patch,delete]
info
operation-microcks-extension
Each operation should declare an x-microcks-operation block for mock compatibility.
$.paths[*][get,post,put,patch,delete]
info
global-tags-defined
A global tags array should be defined.
$
info
tag-description-required
Each global tag should have a description.
$.tags[*]
warn
tag-name-title-case
Tag names should be Title Case (e.g. "Deliveries", "Item Management").
$.tags[*].name
warn
parameter-description-required
Parameters must have a description.
$.paths[*][*].parameters[*]
warn
parameter-name-snake-case
Parameter names should be snake_case.
$.paths[*][*].parameters[*].name
warn
parameter-schema-typed
Each parameter must declare a schema with a type.
$.paths[*][*].parameters[*].schema
warn
request-body-json
Request bodies should offer application/json content.
$.paths[*][post,put,patch].requestBody.content
error
response-success-defined
Each operation must define at least one 2xx response.
$.paths[*][get,post,put,patch,delete].responses
info
response-auth-defined
Operations should document a 401 unauthorized response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-description-required
Every response must have a description.
$.paths[*][*].responses[*]
warn
schema-property-snake-case
Schema property names should be snake_case.
$.components.schemas[*].properties[*]~
info
schema-property-typed
Schema properties should declare a type or $ref.
$.components.schemas[*].properties[*]
warn
security-global-defined
A global security requirement should be declared.
$
warn
security-scheme-bearer-jwt
DoorDash APIs authenticate with a Bearer JWT security scheme.
$.components.securitySchemes[*]
info
security-scheme-described
Security schemes should be described.
$.components.securitySchemes[*]
error
get-no-request-body
GET operations must not declare a request body.
$.paths[*].get
warn
delete-no-request-body
DELETE operations should not declare a request body.
$.paths[*].delete
warn
servers-expected-domain
Server URLs should be on the doordash.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
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
warn
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
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