Amplitude · API Governance Rules

Amplitude API Rules

Spectral linting rules defining API design standards and conventions for Amplitude.

23 Rules error 12 warn 9 info 2
View Rules File View on GitHub

Rule Categories

delete get info no openapi operation parameter response schema security servers

Rules

warn
info-title-has-provider
API title must start with "Amplitude"
$.info.title
error
info-description-required
Info object must have a description
$.info
error
info-version-required
Info object must have a version
$.info
error
openapi-version-3
Must use OpenAPI 3.x
$
error
servers-defined
Servers array must be defined
$
error
servers-https-only
All server URLs must use HTTPS
$.servers[*].url
error
operation-summary-required
Every operation must have a summary
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-amplitude-prefix
Operation summaries should start with "Amplitude"
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
Every operation must have a description
$.paths[*][get,post,put,patch,delete]
error
operation-operationid-required
Every operation must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
operation-operationid-camel-case
operationId should use camelCase
$.paths[*][get,post,put,patch,delete].operationId
error
operation-tags-required
Every operation must have at least one tag
$.paths[*][get,post,put,patch,delete]
warn
parameter-description-required
Every parameter must have a description
$.paths[*][*].parameters[*]
info
parameter-snake-case
Query and path parameter names should use snake_case
$.paths[*][*].parameters[?(@.in=='query' || @.in=='path')].name
error
response-success-required
Every operation must have at least one 2xx response
$.paths[*][get,post,put,patch,delete].responses
warn
response-error-401
Operations should document a 401 response
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
Every response must have a description
$.paths[*][*].responses[*]
info
schema-property-description
Schema properties should have descriptions
$.components.schemas[*].properties[*]
warn
schema-type-required
Schemas should have an explicit type
$.components.schemas[*]
error
security-schemes-defined
Security schemes must be defined if security is used
$.components
error
get-no-request-body
GET operations must not have a request body
$.paths[*].get
warn
delete-no-request-body
DELETE operations should not have a request body
$.paths[*].delete
warn
no-empty-descriptions
Descriptions must not be empty strings
$..description