APIs.guru · API Governance Rules

APIs.guru API Rules

Spectral linting rules defining API design standards and conventions for APIs.guru.

30 Rules error 13 warn 13 info 4
View Rules File View on GitHub

Rule Categories

delete examples external get info no openapi operation parameter paths response schema servers tag tags

Rules

warn
info-title-format
Info title should start with "APIs.guru"
$.info.title
error
info-description-required
Info must have a description
$.info
error
info-version-required
Info must have a version
$.info
warn
info-contact-required
Info should have contact information
$.info
warn
info-license-required
Info should have license information
$.info
warn
openapi-version-3
Specs should use OpenAPI 3.0.x
$.openapi
error
servers-defined
Servers array must be defined
$
error
servers-https-only
Server URLs must use HTTPS
$.servers[*].url
warn
paths-kebab-case
Path segments should use kebab-case
$.paths[*]~
warn
paths-no-trailing-slash
Paths must not have a trailing slash
$.paths[*]~
error
operation-summary-required
All operations must have a summary
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-summary-prefix
Operation summaries should start with "APIs.guru"
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
All operations should have a description
$.paths[*][get,post,put,patch,delete,head,options]
error
operation-id-required
All operations must have an operationId
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-id-camel-case
OperationId should use camelCase
$.paths[*][get,post,put,patch,delete].operationId
error
operation-tags-required
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete,head,options]
warn
tags-defined
Global tags array should be defined
$
warn
tag-description-required
All tags should have descriptions
$.tags[*]
error
parameter-description-required
All parameters must have descriptions
$.paths[*][*].parameters[*]
error
parameter-schema-type-required
All parameters must have a schema type
$.paths[*][*].parameters[*].schema
error
response-success-required
Operations must have at least one 2xx response
$.paths[*][get,post,put,patch,delete]
error
response-description-required
All responses must have descriptions
$.paths[*][*].responses[*]
info
schema-description-recommended
Component schemas should have descriptions
$.components.schemas[*]
warn
schema-type-defined
Schema objects should have a type defined
$.components.schemas[*]
info
no-global-security-required
Security defined at operation or global level
$
error
get-no-request-body
GET operations must not have a request body
$.paths[*].get
warn
delete-no-request-body
DELETE operations should not have a request body
$.paths[*].delete
error
no-empty-descriptions
Descriptions must not be empty strings
$..description
info
external-docs-encouraged
External documentation is encouraged
$
info
examples-encouraged
Schema properties should have examples
$.components.schemas[*].properties[*]