tRPC · API Governance Rules
tRPC API Rules
Spectral linting rules defining API design standards and conventions for tRPC.
8 Rules
error 3
warn 2
Rule Categories
trpc
Rules
warn
trpc-operation-summary-title-case
Operation summaries must use Title Case
$.paths[*][*].summary
error
trpc-operation-tags-required
All operations must have at least one tag
$.paths[*][*]
warn
trpc-trpc-error-schema
Error responses must use the TRPCErrorResult schema
$.paths[*][*].responses[4*,5*].content.application/json.schema
error
trpc-success-response-defined
All operations should define a 200 success response
$.paths[*][get,post]
hint
trpc-procedure-path-format
tRPC procedure paths should use dot notation for nested routers (e.g., router.procedure) or flat names for root procedures
$.paths[*]~
error
trpc-batch-endpoint-post
Batch endpoints must use POST method
$.paths[/batch]
hint
trpc-query-uses-get
Query procedures should use GET method
$.paths[*]~
hint
trpc-input-query-param
GET operations should define an input query parameter
$.paths[*][get]
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/trpc-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.