Veli · API Governance Rules
Veli API Rules
Spectral linting rules defining API design standards and conventions for Veli.
31 Rules
error 13
warn 18
Rule Categories
veli
Rules
error
veli-info-title-exists
API must have an info.title
$.info
warn
veli-info-description-exists
API must have an info.description
$.info
error
veli-info-version-exists
API must have an info.version
$.info
error
veli-openapi-version-3
API must use OpenAPI 3.x
$
warn
veli-servers-exist
API must define at least one server
$
warn
veli-server-url-https
Server URL should use HTTPS
$.servers[*]
error
veli-paths-exist
API must define at least one path
$
warn
veli-path-lowercase
Path segments should use lowercase and hyphens
$.paths[*]~
error
veli-operation-summary-exists
Every operation must have a summary
$.paths[*][get,post,put,patch,delete]
warn
veli-operation-description-exists
Every operation should have a description
$.paths[*][get,post,put,patch,delete]
error
veli-operation-id-exists
Every operation must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
veli-operation-id-camel-case
operationId should be camelCase
$.paths[*][get,post,put,patch,delete].operationId
warn
veli-operation-tags-exist
Every operation should have at least one tag
$.paths[*][get,post,put,patch,delete]
warn
veli-tags-defined
All tags used in operations should be defined at root level
$
warn
veli-parameter-description-exists
All parameters should have a description
$.paths[*][get,post,put,patch,delete].parameters[*]
error
veli-parameter-schema-exists
All parameters must have a schema
$.paths[*][get,post,put,patch,delete].parameters[*]
warn
veli-request-body-description
Request bodies should have a description
$.paths[*][post,put,patch].requestBody
error
veli-request-body-content
Request bodies must define content
$.paths[*][post,put,patch].requestBody
error
veli-responses-exist
Every operation must define responses
$.paths[*][get,post,put,patch,delete]
error
veli-response-success-exists
Every operation must have a 2xx success response
$.paths[*][get,post,put,patch,delete].responses
error
veli-response-description-exists
All responses must have a description
$.paths[*][get,post,put,patch,delete].responses[*]
warn
veli-schema-description-exists
All named schemas should have a description
$.components.schemas[*]
warn
veli-schema-properties-described
Schema properties should have descriptions
$.components.schemas[*].properties[*]
warn
veli-security-defined
API should define security schemes
$.components
warn
veli-security-applied
API should apply security at the root level or per operation
$
error
veli-bearer-auth-scheme
Bearer auth should use http type with bearer scheme
$.components.securitySchemes[?(@.type=='http')]
warn
veli-portfolio-response-schema
Portfolio endpoints should return schema-referenced responses
$.paths['/portfolios'][get,post].responses[200,201].content['application/json'].schema
warn
veli-strategy-id-parameter
Strategy path parameters should be named strategyId
$.paths['/strategies/{strategyId}'][*].parameters[?(@.in=='path')]
warn
veli-portfolio-id-parameter
Portfolio path parameters should be named portfolioId
$.paths['/portfolios/{portfolioId}'][*].parameters[?(@.in=='path')]
error
veli-no-empty-paths
Paths object should not be empty
$.paths
warn
veli-components-schemas-exist
API should define reusable schemas in components
$.components