Stoplight · API Governance Rules
Stoplight — style guides rulebook series rules
Spectral linting rules defining API design standards and conventions for Stoplight.
18 Rules
error 10
warn 6
Published by Stoplight
Served by the provider at https://github.com/stoplightio/style-guides-rulebook-series/blob/454313097a63c60c1d5667923546e5d73d7b4568/.spectral.json; the copy below was fetched from there.
Rule Categories
oas2
oas3
path
paths
query
resource
server
status
Rules
error
oas3-always-use-https
$.servers[*].url
warn
oas2-always-use-https
$.schemes.*
error
server-lowercase
$.servers[*].url
error
server-has-api
$.servers[*].url
error
server-version
$.servers[*].url
off
server-major-version-only
$.servers[*].url
error
path-casing
$.paths
warn
resource-names-plural
$.paths
error
paths-no-trailing-slash
$.paths
error
paths-no-file-extensions
$.paths
error
paths-no-http-verbs
$.paths
off
paths-version-number
$.paths
warn
paths-avoid-special-characters
$.paths
warn
paths-no-query-params
$.paths
error
path-parameters-snake-case
#Request_Parameter_Path
error
query-parameters-snake-case
#Request_Parameter_Query
warn
path-parameters-on-path-only
$.paths[*][*].parameters[?(@.in == 'path')]
warn
status-path-defined
$.paths~
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.