Strava · API Governance Rules
Strava API Rules
Spectral linting rules defining API design standards and conventions for Strava.
10 Rules
error 1
warn 4
info 5
Rule Categories
strava
Rules
warn
strava-operation-ids-camel-case
Strava API uses camelCase operationIds (e.g., getLoggedInAthlete, getActivityById, getLeaderboardBySegmentId).
$.paths[*][*].operationId
warn
strava-tags-title-case
All OpenAPI tags must use Title Case (e.g., 'Athletes', 'Activities', 'Segment Efforts').
$.tags[*].name
warn
strava-oauth2-security
All Strava API operations must use OAuth 2.0 Bearer token security. The security scheme must be stravaBearerAuth.
$.components.securitySchemes
info
strava-pagination-per-page
Strava list endpoints use per_page (not pageSize) for pagination with a maximum of 200 items per page. page parameter starts at 1.
$.paths[*][get].parameters[*].name
info
strava-resource-ids-integer
Strava resource IDs (athletes, activities, segments, clubs, routes) use integer identifiers. Only gear IDs are strings (prefixed with 'b' for bikes or 'g' for shoes).
$.paths['/athletes/{id}/stats', '/activities/{id}', '/segments/{id}', '/clubs/{id}', '/routes/{id}', '/segment_efforts/{id}'][*].parameters[?(@.name == 'id')].schema
info
strava-response-arrays-for-lists
Strava list endpoints return arrays directly at the top level (not wrapped in a data object). Individual resources return objects directly.
$.paths[?(@property.startsWith('/athlete/') && @property != '/athlete' && @property != '/athlete/zones')][get].responses['200'].content['application/json'].schema
info
strava-activity-type-documented
Activity type fields should include documentation about supported sport types (Run, Ride, Swim, Walk, Hike, VirtualRide, etc.).
$.components.schemas.DetailedActivity.properties.type
info
strava-rate-limit-documented
The Strava API has rate limits (100 requests/15 min, 1000/day). API documentation should reference rate limit policies.
$.info
error
strava-operation-summaries-present
All operations must have a summary. Strava uses action-noun format (e.g., 'Get Activity', 'List Athlete Activities').
$.paths[*][get,post,put,delete]
warn
strava-streams-keys-required
The Strava streams endpoints require the 'keys' parameter to specify which stream types to return.
$.paths['/activities/{id}/streams'][get].parameters[?(@.name == 'keys')]