Microsoft Azure Functions · API Governance Rules

Microsoft Azure Functions API Rules

Spectral linting rules defining API design standards and conventions for Microsoft Azure Functions.

19 Rules error 14 warn 2 info 3
View Rules File View on GitHub

Rule Categories

get info no operation parameter paths response security servers tags

Rules

error
info-title-required
API title must be present.
$.info
error
info-description-required
API description must be present.
$.info
error
info-version-required
API version must be specified.
$.info
error
servers-defined
At least one server must be defined.
$
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
error
paths-no-trailing-slash
Paths must not have trailing slashes.
$.paths
info
paths-camelcase
Path segments should use camelCase (Azure convention).
$.paths
error
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
error
operation-operationid-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
error
operation-operationid-unique
Operation IDs must be unique.
$
warn
operation-tags-required
Every operation must have at least one tag.
$.paths[*][get,post,put,patch,delete]
info
tags-title-case
Tag names should use Title Case.
$.tags[*].name
error
parameter-description-required
All parameters must have a description.
$.paths[*][get,post,put,patch,delete].parameters[*]
info
parameter-api-version
Azure APIs should include api-version as a query parameter.
$.paths[*][get,post,put,patch,delete].parameters[?(@.name=='api-version')]
error
response-success-required
Every operation must define a success response.
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
All responses must have a description.
$.paths[*][get,post,put,patch,delete].responses[*]
warn
security-schemes-defined
Security schemes should be defined.
$.components
error
get-no-request-body
GET operations must not have a request body.
$.paths[*].get
error
no-empty-descriptions
Descriptions must not be empty.
$..description