iStreamPlanet · API Governance Rules
iStreamPlanet API Rules
Spectral linting rules defining API design standards and conventions for iStreamPlanet.
19 Rules
error 14
warn 5
Published by iStreamPlanet
Served by the provider at https://github.com/istreamlabs/rest-api-lint/blob/98553242c3d8d4e64c628aa53ce33f9d27dde10b/isp-rules.yaml; the copy below was fetched from there.
Rule Categories
delete
disallow
dns
error
headers
json
listing
params
patch
post
properties
resource
schema
server
Rules
warn
english
$..description
error
json-responses
$..responses.[?(@property == '200' || @ == '201' || @ == '202' || @ == '400' || @ == '401' || @ == '403' || @ == '404' || @ == '422' || @ == '500')].content
error
patch-request-content-type
`PATCH` requests cannot use `application/json`
$.paths.*.[?(@property == 'patch')].requestBody.content[?(@property == 'application/json')]^
warn
patch-prefer-merge
Prefer `application/merge-patch+json` for `PATCH` requests
$.paths.*.[?(@property == 'patch')].requestBody.content
error
server-version
Server URL must include version in the path (except localhost)
$.servers.[*].url
warn
iso8601
$..parameters[?(@ != null)]
error
resource-nouns
$.paths.*~
error
dns-friendly
Identifier parameter missing DNS-friendly pattern, e.g. ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
$..parameters[?(@ != null && (@.name || '').toString().match(/^id[ -_A-Z]|[ -_]id$|[a-z0-9]Id$/) && (@.name || '').toString() !== 'upid_id')]
error
resource-schemas
$..['application/json']
warn
schema-descriptions
$..properties.*
error
properties-lower-snake-case
$..properties[?(!@property.toString().startsWith("$"))]
error
post-with-id
Use PUT/PATCH rather than POSTing with a user-supplied identifier
$.paths.[?(@property.toString().match(/[ -_]id}$|[a-z]Id}$/))]
warn
listing-returns-list
$.paths.[?(!@property.toString().includes("}"))].get.responses.[?(@property.toString().startsWith("2"))].content.*.schema
error
disallow-body
204 response should have no body. Use e.g. 200 otherwise.
$..responses.204
error
delete-response
Delete should return an HTTP 204
$.paths.*[?(@property === 'delete')].responses
error
error-detail
Errors must be problem+JSON or text/plain and include a "detail" field
$..responses.[?((@property.toString().startsWith("4") || @property.toString() === "500") && @property.toString() != "429")]
error
headers-hyphenated-pascal-case
'HTTP' headers MUST follow 'Hyphenated-Pascal-Case' notation
$..parameters[?(@ != null && @.in == 'header')].name
error
params-lower-snake-case
$..parameters[?(@ != null && (@.in == 'query' || @ == 'path'))].name
error
params-location
Required parameters must be in the URL path or header
$..parameters[?(@ != null && @.in != 'path' && @.in != 'header')]
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.