Restaurant365 · API Governance Rules
Restaurant365 API Rules
Spectral linting rules defining API design standards and conventions for Restaurant365.
25 Rules
error 6
warn 15
info 4
Rule Categories
info
odata
openapi
operation
parameter
request
response
schema
security
servers
tag
Rules
error
info-title-required
API title must be present.
$.info
warn
info-description-required
API description must be present and meaningful.
$.info
error
info-version-required
API version must be present.
$.info
warn
info-contact-required
API should declare a maintainer contact.
$.info
warn
openapi-version-3-1
Specs should use OpenAPI 3.1.x.
$.openapi
error
servers-defined
At least one server must be defined.
$
error
servers-https
Server URLs must use HTTPS.
$.servers[*].url
warn
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-title-case
Operation summaries must use Title Case (each word capitalized).
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
error
operation-operationId-required
Every operation must declare an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-operationId-camel-case
operationId must be camelCase (e.g. listTransactions, createApInvoices).
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-tags-required
Every operation must be tagged.
$.paths[*][get,post,put,patch,delete]
info
tag-description-required
Global tags should have descriptions.
$.tags[*]
warn
tag-title-case
Tag names must use Title Case.
$.tags[*].name
warn
parameter-description-required
Parameters should have descriptions.
$.paths[*][get,post,put,patch,delete].parameters[*]
info
odata-query-options-dollar-prefixed
OData system query options must be $-prefixed (e.g. $filter, $top).
$.paths[*].get.parameters[?(@.in=='query')].name
warn
request-body-json
Request bodies should accept application/json.
$.paths[*][post,put,patch].requestBody.content
warn
response-success-defined
Each operation must define a 200 success response.
$.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-auth-error-defined
Authenticated write operations should document a 401 response.
$.paths[*].post.responses
warn
schema-property-types-defined
Schema properties must declare a type.
$.components.schemas[*].properties[*]
info
schema-id-uuid-format
OData identifier properties ending in Id should be uuid-formatted.
$.components.schemas[*].properties[?(@property.match(/Id$/))]
warn
security-schemes-defined
A securitySchemes block must be defined.
$.components
warn
operation-write-secured
Record-creation POST operations must declare security.
$.paths[*].post