Microsoft Visio · API Governance Rules
Microsoft Visio API Rules
Spectral linting rules defining API design standards and conventions for Microsoft Visio.
24 Rules
error 12
warn 12
Rule Categories
error
get
info
no
openapi
operation
parameter
path
response
schema
security
servers
Rules
error
info-title-must-contain-microsoft-visio
Info title must contain 'Microsoft' or 'Visio'
$.info.title
error
info-description-required
Info description is required
$.info
error
info-version-required
Info version is required
$.info
error
openapi-version-3
Must use OpenAPI 3.x
$.openapi
error
servers-must-be-defined
Servers array must be defined
$
error
servers-https-required
All server URLs must use HTTPS
$.servers[*].url
error
operation-operationid-required
Every operation must have an operationId
$.paths[*][get,post,put,patch,delete]
error
operation-summary-required
Every operation must have a summary
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-prefix
Operation summaries should start with 'Microsoft Visio'
$.paths[*][get,post,put,patch,delete].summary
error
operation-tags-required
Every operation must have at least one tag
$.paths[*][get,post,put,patch,delete]
warn
operation-operationid-camel-case
operationId should use camelCase
$.paths[*][get,post,put,patch,delete].operationId
warn
parameter-description-required
Parameters must have a description
$.paths[*][get,post,put,patch,delete].parameters[*]
error
response-success-required
Every operation must define a success response
$.paths[*][get,post,put,patch,delete].responses
warn
response-401-recommended
Operations should define a 401 Unauthorized response
$.paths[*][get,post,put,patch,delete].responses
error
security-global-defined
Global security must be defined
$
error
get-no-request-body
GET operations must not have a request body
$.paths[*].get
warn
servers-expected-domain
Server URLs should be on the microsoft.com domain.
$.servers[*].url
warn
path-params-casing
Path parameters should be kebab-case (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
warn
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
security-schemes-defined
Security schemes should be defined in components.
$.components
warn
error-schema-defined
A shared error schema (ErrorResponse) should be defined for error payloads.
$.components.schemas
warn
operation-documents-404
Operations should document a 404 response (documented on 100% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description