Spotify · API Governance Rules
Spotify API Rules
Spectral linting rules defining API design standards and conventions for Spotify.
14 Rules
error 7
warn 4
info 3
Rule Categories
spotify
Rules
error
spotify-operation-ids-required
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
error
spotify-operation-summary-required
All operations must have a summary
$.paths[*][get,post,put,patch,delete]
error
spotify-tags-required
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
error
spotify-response-200-get
GET operations must have a 200 response
$.paths[*].get
error
spotify-response-401-required
All operations must document 401 Unauthorized (OAuth required)
$.paths[*][get,post,put,patch,delete]
warn
spotify-response-403-required
All operations should document 403 Forbidden (scope missing)
$.paths[*][get,post,put,patch,delete]
error
spotify-response-429-required
All operations must document 429 Too Many Requests
$.paths[*][get,post,put,patch,delete]
error
spotify-oauth2-security
API must use OAuth 2.0 security scheme
$.components.securitySchemes.oauth_2_0
info
spotify-path-ids-use-kebab
Path parameters for IDs should use underscore_case naming
$.paths[*]~
warn
spotify-pagination-limit-param
List endpoints should support a 'limit' query parameter
$.paths[?(@property.match(/\/tracks$|\/albums$|\/artists$|\/playlists$|\/items$|\/episodes$/))]..parameters[?(@.name == 'limit')]
info
spotify-spotify-uri-format
Spotify URI fields should follow spotify:{type}:{id} pattern
$.components.schemas[*].properties.uri
info
spotify-market-param-naming
Market parameters should be named 'market' and use ISO 3166-1 codes
$.paths[*][get,post].parameters[?(@.name == 'market')]
warn
spotify-response-schema-required
Success responses must include a schema
$.paths[*].get.responses['200'].content.application/json
warn
spotify-description-required
Operations should have descriptions
$.paths[*][get,post,put,patch,delete]