Lightspeed · API Governance Rules
Lightspeed API Rules
Spectral linting rules defining API design standards and conventions for Lightspeed.
28 Rules
error 6
warn 12
info 10
Rule Categories
delete
get
info
openapi
operation
parameter
paths
request
response
schema
security
servers
tag
Rules
warn
info-title-lightspeed-prefix
API title should start with "Lightspeed".
$.info
warn
info-description-required
Info object must have a non-trivial description.
$.info
error
info-version-required
Info object must declare a version.
$.info
info
info-contact-required
Info object should include a contact.
$.info
warn
openapi-version-3-1
Lightspeed specs target OpenAPI 3.1.x.
$
error
servers-defined
At least one server must be defined.
$
error
servers-https
Server URLs must use HTTPS.
$.servers[*]
info
servers-lightspeed-host
Server URLs should point at a lightspeed host.
$.servers[*]
warn
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths
error
paths-no-query-string
Path keys must not contain query strings.
$.paths
warn
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
info
operation-summary-lightspeed-prefix
Operation summaries should be prefixed with "Lightspeed".
$.paths[*][get,post,put,patch,delete]
info
operation-description-required
Every operation should 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-camelcase
operationId should be camelCase (Lightspeed convention).
$.paths[*][get,post,put,patch,delete]
warn
operation-tags-required
Every operation must be tagged.
$.paths[*][get,post,put,patch,delete]
info
tag-title-case
Global tag names should use Title Case.
$.tags[*]
info
parameter-description-required
Parameters should have descriptions.
$.paths[*][get,post,put,patch,delete].parameters[?(@.name)]
warn
parameter-schema-typed
Parameters must define a typed schema.
$.paths[*][get,post,put,patch,delete].parameters[?(@.name && @.schema)]
info
request-body-json
Request bodies should offer application/json.
$.paths[*][post,put,patch].requestBody.content
warn
response-success-defined
Operations must define at least one 2xx response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-description-required
Every response must have a description.
$.paths[*][get,post,put,patch,delete].responses[*]
info
schema-type-defined
Component schemas should declare a type.
$.components.schemas[*]
warn
security-global-defined
A global security requirement should be declared.
$
info
security-schemes-oauth2
Lightspeed POS APIs authenticate with OAuth 2.0.
$.components.securitySchemes[*]
error
get-no-request-body
GET operations must not declare a request body.
$.paths[*].get
warn
delete-no-request-body
DELETE operations must not declare a request body.
$.paths[*].delete
info
operation-microcks-extension
Operations should carry an x-microcks-operation extension for mocking.
$.paths[*][get,post,put,patch,delete]