Swagger · API Governance Rules
Swagger API Rules
Spectral linting rules defining API design standards and conventions for Swagger.
10 Rules
error 4
warn 6
Rule Categories
swagger
Rules
warn
swagger-oas-operations-have-tags
All OpenAPI operations must have at least one tag for organization
$.paths[*][get,put,post,delete,patch,options,head,trace]
error
swagger-oas-operations-have-summaries
All OpenAPI operations must have a summary in Title Case
$.paths[*][get,put,post,delete,patch,options,head,trace]
warn
swagger-oas-summaries-title-case
OpenAPI operation summaries should use Title Case
$.paths[*][get,put,post,delete,patch,options,head,trace].summary
error
swagger-oas-operations-have-operation-ids
All OpenAPI operations must have an operationId for code generation
$.paths[*][get,put,post,delete,patch,options,head,trace]
warn
swagger-oas-operations-have-descriptions
All OpenAPI operations should have a description
$.paths[*][get,put,post,delete,patch,options,head,trace]
error
swagger-oas-path-params-required
All path parameters must be marked as required
$.paths[*][*].parameters[?(@.in == 'path')]
warn
swagger-oas-schemas-have-descriptions
All component schemas must have a description
$.components.schemas[*]
error
swagger-oas-info-required-fields
API info object must have title, description, and version
$.info
warn
swagger-oas-responses-have-descriptions
All response objects must have a description
$.paths[*][*].responses[*]
warn
swagger-oas-paths-kebab-case
API paths should use kebab-case (lowercase with hyphens, no underscores)
$.paths[*]~
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/swagger-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.