Last.fm · API Governance Rules
Last.fm API Rules
Spectral linting rules defining API design standards and conventions for Last.fm.
13 Rules
error 6
warn 4
info 3
Rule Categories
lastfm
Rules
error
lastfm-operation-ids-required
All operations must have an operationId.
$.paths[*][get,post,put,patch,delete]
error
lastfm-operation-summary-required
All operations must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
lastfm-operation-summary-title-case
Operation summaries should use Title Case.
$.paths[*][get,post,put,patch,delete].summary
error
lastfm-tags-required
All operations must have at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
lastfm-api-key-required
All read operations should accept the api_key parameter.
$.paths[?(@property.match(/method=/))].get.parameters[*]
warn
lastfm-method-name-convention
Method names should follow `package.methodName` naming (camelCase method).
$.paths[*]
error
lastfm-write-operations-require-post
Write methods (addTags, removeTag, scrobble, love, unlove, updateNowPlaying, getSession, getMobileSession) must use POST.
$.paths[?(@property.match(/addTags|removeTag|scrobble|love|unlove|updateNowPlaying|getMobileSession/))]
error
lastfm-response-200-required
All operations must document a 200 response.
$.paths[*][get,post,put,patch,delete]
info
lastfm-error-codes-documented
Documented Last.fm numeric error codes should be referenced in descriptions.
$.components.schemas.ErrorPayload.properties.error.description
info
lastfm-rate-limit-documented
API description should mention the 5 req/sec/origin rate guidance.
$.info.description
error
lastfm-security-defined
API must define ApiKeyAuth and SignedAuth security schemes.
$.components.securitySchemes
warn
lastfm-base-url-canonical
Primary server URL must be https://ws.audioscrobbler.com/2.0.
$.servers[0].url
info
lastfm-format-param-json
Operations should support format=json via the format query parameter.
$.components.parameters.FormatParam.schema.enum