jService · API Governance Rules
jService API Rules
Spectral linting rules defining API design standards and conventions for jService.
11 Rules
error 6
warn 5
Rule Categories
jservice
Rules
error
jservice-operation-id-camelcase
operationId must be camelCase (matches jService's existing operationIds).
$.paths.*[get,post,put,patch,delete].operationId
error
jservice-snake-case-properties
Schema properties must be snake_case (matches Rails/ActiveRecord JSON output).
$.components.schemas.*.properties.*~
error
jservice-snake-case-query-params
Query parameters must be snake_case.
$.paths.*[get,post,put,patch,delete].parameters[?(@.in=='query')].name
warn
jservice-summary-title-case
Operation summary should be Title Case.
$.paths.*[get,post,put,patch,delete].summary
error
jservice-summary-required
Every operation must have a summary.
$.paths.*[get,post,put,patch,delete]
warn
jservice-description-required
Every operation must have a description.
$.paths.*[get,post,put,patch,delete]
error
jservice-tag-required
Every operation must be tagged.
$.paths.*[get,post,put,patch,delete]
warn
jservice-allowed-tags
Operations must use one of the known jService tags.
$.paths.*[get,post,put,patch,delete].tags[*]
warn
jservice-paths-under-api
All operational paths live under /api/.
$.paths
warn
jservice-pagination-max-100
count/offset limits should mirror the source code (count <= 100).
$.paths.*.get.parameters[?(@.name=='count')].schema
error
jservice-json-only
jService responds only in application/json.
$.paths.*[get,post,put,patch,delete].responses.*.content