MobileAPI.dev · API Governance Rules
MobileAPI.dev API Rules
Spectral linting rules defining API design standards and conventions for MobileAPI.dev.
11 Rules
error 3
warn 4
info 4
Rule Categories
mobileapi
Rules
error
mobileapi-operation-summary-required
Every operation must have a summary.
$.paths.*[get,post,put,patch,delete]
warn
mobileapi-operation-summary-title-case
Operation summaries should be in Title Case (first word capitalized, no trailing period).
$.paths.*[get,post,put,patch,delete].summary
warn
mobileapi-tags-lowercase-hyphen
Tags should be lowercase, hyphen-separated.
$.paths.*[get,post,put,patch,delete].tags[*]
error
mobileapi-operation-id-required
Every operation must declare an operationId.
$.paths.*[get,post,put,patch,delete]
warn
mobileapi-path-trailing-slash
Paths should end with a trailing slash (Django convention).
$.paths
warn
mobileapi-success-response-required
Every operation should declare a 2xx success response.
$.paths.*[get,post,put,patch,delete].responses
info
mobileapi-unauthorized-response-documented
Authenticated operations should document a 401 response.
$.paths[?(@property != '/api-token-auth/' && @property != '/status/' && @property != '/payment_successful' && @property != '/payment_successful/')]*[get,post,put,patch,delete].responses
info
mobileapi-rate-limit-response-documented
Operations that consume credits should document a 429 Too Many Requests response.
$.paths[?(@property != '/api-token-auth/' && @property != '/status/')]*[get,post,put,patch,delete].responses
info
mobileapi-schema-id-property
Resource schemas should include an 'id' property as primary key.
$.components.schemas[?(@.type == 'object')]
info
mobileapi-prefer-header-auth
Document Authorization header as primary auth, query parameter as fallback only.
$.components.securitySchemes
error
mobileapi-https-server
Production server URL must use HTTPS.
$.servers[*].url