HashiCorp Vault · API Governance Rules
HashiCorp Vault API Rules
Spectral linting rules defining API design standards and conventions for HashiCorp Vault.
28 Rules
error 11
warn 12
info 5
Rule Categories
delete
get
info
no
openapi
operation
parameter
paths
response
schema
security
servers
tags
vault
Rules
error
info-title-required
API title must be present.
$.info
warn
info-title-starts-with-hashicorp-vault
API title should start with "HashiCorp Vault".
$.info.title
warn
info-description-required
API info description must be present.
$.info
error
info-version-required
API version must be specified.
$.info
error
openapi-version-3x
API specification must use OpenAPI 3.x.
$
error
servers-required
Servers array must be defined.
$
error
servers-https-required
Server URLs must use HTTPS.
$.servers[*].url
info
paths-v1-prefix
All Vault API paths begin at the server level v1 — paths should be relative.
$.paths
warn
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths
error
operation-operationId-required
All operations must have an operationId.
$.paths[*][get,post,put,patch,delete,options,head]
warn
operation-operationId-camelCase
operationId should 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-hashicorp-vault
Operation summaries should start with "HashiCorp Vault".
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
All operations should have a description.
$.paths[*][get,post,put,patch,delete]
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
parameter-description-required
All parameters should have a description.
$..parameters[*]
error
response-success-required
Operations must define at least one success (2xx or 204) response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-403-required
Vault operations should define 403 Permission Denied response.
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
All responses must have a description.
$.paths[*][*].responses[*]
warn
schema-description-required
Schema definitions should have descriptions.
$.components.schemas[*]
info
schema-properties-have-descriptions
Schema properties should have descriptions.
$.components.schemas[*].properties[*]
error
security-schemes-defined
Security schemes must be defined in components.
$.components
info
vault-token-header-not-bearer
Vault uses X-Vault-Token header, not Authorization Bearer.
$.components.securitySchemes[?(@.type == 'apiKey')]
error
get-no-request-body
GET operations must not have a request body.
$.paths[*].get
info
delete-returns-204
DELETE operations should return 204 No Content.
$.paths[*].delete.responses
warn
no-empty-description
Descriptions must not be empty strings.
$..description
info
operation-has-microcks-extension
Operations should have x-microcks-operation for mock compatibility.
$.paths[*][get,post,put,patch,delete]