Lunchbox · API Governance Rules
Lunchbox API Rules
Spectral linting rules defining API design standards and conventions for Lunchbox.
31 Rules
error 8
warn 15
info 8
Rule Categories
delete
get
info
openapi
operation
parameter
paths
request
response
schema
security
servers
tag
tags
Rules
warn
info-title-lunchbox
API title should start with "Lunchbox".
$.info.title
warn
info-description-required
Info description is required and should be meaningful.
$.info
error
info-version-required
Info version is required.
$.info
info
info-contact-required
Contact information should be provided.
$.info
error
openapi-version-3
Specs must use OpenAPI 3.0.x.
$.openapi
error
servers-defined
At least one server must be defined.
$.servers
warn
servers-https
Server URLs must use HTTPS.
$.servers[*].url
info
servers-description
Each server should have a description.
$.servers[*]
warn
paths-no-trailing-slash
Paths should not end with a trailing slash (except root collections).
$.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]
warn
operation-summary-lunchbox-prefix
Operation summaries should start with "Lunchbox".
$.paths[*][get,post,put,patch,delete].summary
error
operation-operationid-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-operationid-camelcase
operationId should be camelCase.
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-tags-required
Every operation must have at least one tag.
$.paths[*][get,post,put,patch,delete]
info
tags-global-defined
A global tags array should be defined.
$
info
tag-description
Each global tag should have a description.
$.tags[*]
warn
tag-title-case
Tag names should be Title Case (e.g., "User Wallet", "Service Types").
$.tags[*].name
warn
parameter-snake-case
Parameter names should be snake_case (Lunchbox convention).
$.paths[*][*].parameters[*].name
error
parameter-schema-required
Each parameter must define a schema.
$.paths[*][*].parameters[*]
warn
request-body-json
Request bodies should offer application/json.
$.paths[*][post,put,patch].requestBody.content
error
response-success-defined
Each operation must define at least one 2xx response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-description-required
Each response must have a description.
$.paths[*][*].responses[*]
info
schema-property-snake-case
Schema property names should be snake_case (Core/Management/POS convention).
$.components.schemas[*].properties[*]~
info
schema-property-typed
Schema properties should declare a type or a $ref.
$.components.schemas[*].properties[*]
warn
security-global-defined
A global security requirement should be defined.
$
warn
security-schemes-defined
Security schemes must be declared under components.
$.components
info
security-scheme-described
Each security scheme should have a description.
$.components.securitySchemes[*]
error
get-no-request-body
GET operations must not declare a request body.
$.paths[*].get
warn
delete-no-request-body
DELETE operations should not declare a request body.
$.paths[*].delete
info
operation-examples-encouraged
Operations are encouraged to provide response examples.
$.paths[*][*].responses[*].content.application/json