SpotOn · API Governance Rules
SpotOn API Rules
Spectral linting rules defining API design standards and conventions for SpotOn.
35 Rules
error 10
warn 20
info 5
Authorship not recorded
No authorship marker is recorded for this file. It is not presented as the provider's; it was most likely written by an API Evangelist pass before outputs were stamped.
Rule Categories
error
get
info
microcks
openapi
operation
parameter
paths
post
request
response
schema
security
servers
tag
Rules
warn
info-title-spoton-prefix
API title should start with "SpotOn".
$.info
warn
info-description-required
Info object must have a description of at least 40 characters.
$.info
error
info-version-required
Info object must declare a version.
$.info
info
info-contact-required
Info object should include contact information.
$.info
warn
openapi-version-3
Specs must be OpenAPI 3.0.x.
$
error
servers-defined
A servers array must be defined.
$
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*]
warn
servers-have-description
Each server should have a description (for example Production or Sandbox).
$.servers[*]
warn
paths-kebab-case
Path segments must be lowercase kebab-case (path parameters in camelCase braces allowed).
$.paths[*]~
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
error
operation-operationid-required
Every operation must declare an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-operationid-camelcase
operationId should be camelCase.
$.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-spoton-prefix
Operation summaries should start with "SpotOn".
$.paths[*][get,post,put,patch,delete]
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
warn
operation-tags-required
Every operation must be tagged.
$.paths[*][get,post,put,patch,delete]
info
tag-has-description
Global tags should have descriptions.
$.tags[*]
warn
tag-title-case
Tag names should be Title Case.
$.tags[*]
warn
parameter-description-required
Parameters must have a description.
$.paths[*][get,post,put,patch,delete].parameters[*]
warn
parameter-camelcase
Parameter names should be camelCase.
$.paths[*][get,post,put,patch,delete].parameters[?(@.name && @.in != 'header')]
error
parameter-no-apikey-in-query
API keys must be passed in the x-api-key header, never in query parameters.
$.paths[*][get,post,put,patch,delete].parameters[?(@.in == 'query')]
warn
request-body-json
Request bodies should offer an application/json representation.
$.paths[*][post,put,patch].requestBody.content
error
response-success-defined
Operations must define a 200 success response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-unauthorized-defined
Operations should define a 401 Unauthorized response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-forbidden-defined
Operations should define a 403 Forbidden response for per-location and per-restaurant access.
$.paths[*][get,post,put,patch,delete].responses
info
response-server-error-defined
Operations should define a 500 server error response.
$.paths[*][get,post,put,patch,delete].responses
warn
error-schema-has-message
The Error schema must include a message property.
$.components.schemas.Error.properties
warn
schema-property-camelcase
Schema property names should be camelCase.
$.components.schemas[*].properties[*]~
warn
schema-property-has-type-or-ref
Schema properties must declare a type or a $ref.
$.components.schemas[*].properties[*]
info
schema-top-level-description
Top-level component schemas should have a description.
$.components.schemas[*]
warn
security-global-defined
A global security requirement must be declared.
$
error
security-apikey-scheme-defined
An apiKeyAuth security scheme using the x-api-key header must be defined.
$.components.securitySchemes.apiKeyAuth
error
get-no-request-body
GET operations must not declare a request body.
$.paths[*].get
warn
post-has-request-body
POST operations should declare a request body.
$.paths[*].post
info
microcks-operation-present
Operations should carry an x-microcks-operation extension for mock-server compatibility.
$.paths[*][get,post,put,patch,delete]
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.