Swetrix · API Governance Rules
Swetrix API Rules
Spectral linting rules defining API design standards and conventions for Swetrix.
9 Rules
error 2
warn 6
Rule Categories
swetrix
Rules
warn
swetrix-api-key-header
Admin and Statistics API endpoints must use X-Api-Key security scheme
$.components.securitySchemes
warn
swetrix-operation-id-camel-case
Operation IDs must use camelCase naming convention
$.paths[*][get,post,put,patch,delete]
hint
swetrix-events-path-prefix
Events API paths should use /log prefix
$.paths
warn
swetrix-summary-title-case
Operation summaries must use Title Case
$.paths[*][get,post,put,patch,delete].summary
error
swetrix-post-request-body
POST operations must define a requestBody
$.paths[*].post
warn
swetrix-operation-tags
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
error
swetrix-pid-required
The pid parameter must be marked as required
$.paths[*][get,post,put,patch,delete].parameters[?(@.name == 'pid')]
warn
swetrix-error-responses
Mutating operations should document 400 error responses
$.paths[*][post,put,patch].responses
warn
swetrix-success-response-content
Success responses (200/201) should define content schema
$.paths[*][get,post,put,patch].responses[200,201]
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for spectral rules
4 MCP tools reach this
find_rulesBrowse and filter every ruleset in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This ruleset
curl "https://apis.io/api/v1/rules/swetrix-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.