Lightspark · API Governance Rules
Lightspark API Rules
Spectral linting rules defining API design standards and conventions for Lightspark.
13 Rules
error 8
warn 4
info 1
Rule Categories
delete
enum
field
no
oneOf
pagination
path
paths
query
schema
Rules
error
field-names-camelCase
Schema property names must be camelCase
$.components.schemas[?(@property != 'TestWebhookResponse')].properties
error
enum-values-upper-snake-case
Enum values must be UPPER_SNAKE_CASE
$.components.schemas.*.enum[*]
error
query-params-camelCase
Query parameter names must be camelCase
$.paths.*.*.parameters[?(@.in=='query')].name
error
path-params-camelCase
Path parameter names must be camelCase
$.paths.*.*.parameters[?(@.in=='path')].name
error
oneOf-must-have-discriminator
oneOf schemas must include a discriminator
$..*[?(@ && @.oneOf)]
error
no-inline-request-schema
Request body schemas must use $ref, not inline definitions
$.paths[*][get,post,put,patch,delete].requestBody.content[application/json].schema
error
no-inline-response-schema
Response body schemas must use $ref, not inline definitions
$.paths[*][get,post,put,patch,delete].responses[*].content[application/json].schema
warn
pagination-envelope-has-data
Paginated responses must include a 'data' array field
$.paths.*.get.responses.200.content.application/json.schema.properties
warn
pagination-envelope-has-hasMore
Paginated responses must include a 'hasMore' boolean field
$.paths.*.get.responses.200.content.application/json.schema.properties[?(@.data)]
warn
delete-returns-204
DELETE operations should return 204 No Content
$.paths.*.delete.responses
warn
schema-properties-have-descriptions
Schema properties should have descriptions
$.components.schemas.*.properties.*
info
schema-properties-have-examples
String and number schema properties should have examples
$.components.schemas.*.properties[?(@.type=='string' || @.type=='integer' || @.type=='number')]
error
paths-kebab-case
Path segments should use kebab-case
$.paths