Varonis · API Governance Rules
Varonis API Rules
Spectral linting rules defining API design standards and conventions for Varonis.
34 Rules
error 13
warn 20
info 1
Rule Categories
get
info
no
openapi
operation
parameter
paths
post
request
response
schema
security
servers
tags
Rules
error
info-title-required
API title must be present and non-empty.
$.info
warn
info-title-starts-with-varonis
API title should start with "Varonis".
$.info.title
warn
info-description-required
API description must be present and non-empty.
$.info
error
info-version-required
API version must be specified.
$.info
warn
info-contact-required
Contact information should be present.
$.info
error
openapi-version-3x
API specification must use OpenAPI 3.x.
$
error
servers-required
At least one server must be defined.
$
error
servers-https-required
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-description-required
Each server should have a description.
$.servers[*]
error
operation-operationId-required
All operations must have an operationId.
$.paths[*][get,post,put,patch,delete,options,head]
warn
operation-operationId-camelCase
operationId must use camelCase.
$.paths[*][get,post,put,patch,delete].operationId
error
operation-summary-required
All operations must have a summary.
$.paths[*][get,post,put,patch,delete,options,head]
warn
operation-summary-starts-with-varonis
Operation summaries should start with "Varonis".
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
All operations must have a description.
$.paths[*][get,post,put,patch,delete,options,head]
warn
operation-tags-required
All operations must have at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
tags-global-defined
Global tags array should be defined.
$
warn
tags-description-required
Each global tag should have a description.
$.tags[*]
warn
parameter-description-required
All parameters must have a description.
$..parameters[*]
error
parameter-schema-type-required
All parameters must have a schema with a type.
$..parameters[*].schema
warn
request-body-description-required
Request bodies should have a description.
$.paths[*][post,put,patch].requestBody
warn
request-body-content-json
POST/PUT/PATCH operations should accept application/json.
$.paths[*][post,put,patch].requestBody.content
error
response-success-required
Operations must define at least one success (2xx) response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-400-for-post
POST operations with request bodies should define 400 Bad Request.
$.paths[*].post.responses
warn
response-401-required
Operations should define 401 Unauthorized.
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
All responses must have a description.
$.paths[*][*].responses[*]
warn
schema-property-description-required
Top-level schema definitions should have a description.
$.components.schemas[*]
warn
schema-properties-have-types
Schema properties should have explicit types.
$.components.schemas[*].properties[*]
error
security-schemes-defined
Security schemes must be defined in components.
$.components
warn
security-global-defined
Global security should be defined.
$
error
security-apikey-header-not-query
API keys should be passed in headers, not query parameters.
$.components.securitySchemes[?(@.type == 'apiKey')]
error
get-no-request-body
GET operations must not have a request body.
$.paths[*].get
info
post-should-have-request-body
POST operations should typically have a request body.
$.paths[*].post
warn
no-empty-description
Descriptions must not be empty strings.
$..description
warn
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths