Microsoft Project · API Governance Rules

Microsoft Project API Rules

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

39 Rules error 23 warn 9 info 7
View Rules File View on GitHub

Rule Categories

delete get info microcks no openapi operation parameter paths post request response schema security servers tag tags uuid

Rules

error
info-title-required
Info object must have a title
$.info
warn
info-title-prefix
Title should start with "Microsoft Project"
$.info.title
error
info-description-required
Info object must have a description
$.info
warn
info-description-min-length
Info description should be at least 50 characters
$.info.description
error
info-version-required
Info object must have a version
$.info
warn
info-contact-required
Info object should have contact information
$.info
error
openapi-version
OpenAPI version should be 3.0.x
$.openapi
error
servers-defined
At least one server must be defined
$
error
servers-https
Server URLs must use HTTPS
$.servers[*].url
warn
servers-description
Each server should have a description
$.servers[*]
error
paths-no-trailing-slash
Paths must not end with a trailing slash
$.paths
error
paths-no-query-strings
Paths must not contain query strings
$.paths
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 Project"
$.paths[*][get,post,put,patch,delete].summary
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]
warn
operation-operationid-camel-case
Operation IDs should use camelCase
$.paths[*][get,post,put,patch,delete].operationId
error
operation-tags-required
Every operation must have at least one tag
$.paths[*][get,post,put,patch,delete]
warn
tags-defined
Global tags array should be defined
$
info
tag-description
Each global tag should have a description
$.tags[*]
error
parameter-description-required
Every parameter must have a description
$..parameters[*]
error
parameter-schema-required
Every parameter must have a schema with a type
$..parameters[*]
error
parameter-path-required
Path parameters must be required
$..parameters[?(@.in == 'path')]
warn
request-body-json
Request bodies should use application/json content type
$.paths[*][post,put,patch].requestBody.content
error
response-success-required
Every operation must define a success response (2xx)
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
Every response must have a description
$.paths[*][get,post,put,patch,delete].responses[*]
info
response-401-defined
Operations should define a 401 Unauthorized response
$.paths[*][get,post,put,patch,delete].responses
error
schema-type-defined
All schemas must define a type
$.components.schemas[*]
info
schema-properties-pascal-case
Schema properties should use PascalCase (Microsoft convention)
$.components.schemas[*].properties
error
security-defined
Global security must be defined
$
error
security-schemes-defined
Security schemes must be defined in components
$.components
warn
security-oauth2-scheme
OAuth2 security scheme should be defined for SharePoint APIs
$.components.securitySchemes
error
get-no-request-body
GET operations must not have a request body
$.paths[*].get
error
delete-no-request-body
DELETE operations must not have a request body
$.paths[*].delete
info
post-request-body
POST operations should have a request body
$.paths[*].post
error
no-empty-descriptions
Descriptions must not be empty strings
$..description
info
schema-description
Top-level schemas should have descriptions
$.components.schemas[*]
info
uuid-format
GUID/UUID properties should use format uuid
$.components.schemas[*].properties[?(@.type == 'string' && @.description && /identifier|GUID|uuid/i.test(@.description))]
info
microcks-operation-extension
Operations should have x-microcks-operation for mock compatibility
$.paths[*][get,post,put,patch,delete]