Reddit · API Governance Rules
Reddit API Rules
Spectral linting rules defining API design standards and conventions for Reddit.
12 Rules
error 3
warn 8
info 1
Rule Categories
reddit
Rules
error
reddit-oauth2-security
All Reddit API operations must use OAuth 2.0 authentication. The oauth2 security scheme must be defined with authorizationCode flow pointing to reddit.com authorization endpoints.
$.components.securitySchemes.oauth2.flows.authorizationCode
warn
reddit-user-agent-required
Reddit API requires a descriptive User-Agent header identifying the application. This must be documented in the API info or parameters.
$.info
warn
reddit-rate-limits-documented
Reddit API has strict rate limits (60 req/min for authenticated, 1 req/sec for Ads API). Rate limits must be documented in the API description.
$.info.description
error
reddit-operation-id-required
All Reddit API operations must have operationIds for SDK generation and tooling support.
$.paths[*][get,post,put,delete,patch]
warn
reddit-summary-title-case
Operation summaries must use Title Case formatting following Reddit API documentation conventions.
$.paths[*][get,post,put,delete,patch].summary
warn
reddit-operation-description
All Reddit API operations must include descriptions explaining the endpoint behavior, required scopes, and response format.
$.paths[*][get,post,put,delete,patch]
info
reddit-pagination-params
Reddit listing endpoints use after/before fullname-based pagination rather than page numbers. List endpoints should document pagination.
$.paths[*][get]
warn
reddit-subreddit-param-type
The subreddit path parameter must be of type string as subreddit names are alphanumeric strings.
$.paths[*][get,post,put,delete,patch].parameters[?(@.name === 'subreddit')].schema
warn
reddit-response-schema
GET operations must define response schemas to document the structure of Reddit Thing and Listing objects.
$.paths[*][get].responses[200].content.application/json
warn
reddit-401-response
All Reddit API endpoints must define a 401 Unauthorized response since all endpoints require valid OAuth 2.0 tokens.
$.paths[*][get,post,put,delete,patch].responses
warn
reddit-tags-required
All operations must include tags to organize the Reddit API by functional area (Account, Subreddits, Links and Comments, etc.).
$.paths[*][get,post,put,delete,patch]
error
reddit-server-url
Authenticated Reddit API endpoints must use oauth.reddit.com as the base server URL. Public endpoints may use www.reddit.com.
$.servers[0]