Soracom · API Governance Rules
Soracom API Rules
Spectral linting rules defining API design standards and conventions for Soracom.
6 Rules
error 1
warn 5
Rule Categories
soracom
Rules
warn
soracom-paths-must-be-snake-case
Path segments must use snake_case to match Soracom conventions (e.g. `/port_mappings`, `/event_handlers`).
$.paths.*~
warn
soracom-operation-id-camel-case
operationId must use camelCase verb+noun (Soracom convention).
$.paths.*[get,post,put,patch,delete].operationId
error
soracom-operation-must-have-tag
Every operation must declare at least one tag mapping to a Soracom service surface.
$.paths.*[get,post,put,patch,delete]
warn
soracom-list-must-support-pagination
List operations (operationId starts with `list`) should accept `limit` and `last_evaluated_key` query params.
$.paths.*.get[?(@.operationId =~ /^list/)]
warn
soracom-id-path-params-string
ID-style path parameters (sim_id, imsi, device_id, group_id, etc.) must be typed `string`.
$.paths..parameters[?(@.in == "path" && (@.name == "sim_id" || @.name == "imsi" || @.name == "device_id" || @.name == "group_id" || @.name == "operator_id"))].schema.type
warn
soracom-write-op-has-4xx
POST/PUT/PATCH/DELETE operations should document at least one 4xx response.
$.paths.*[post,put,patch,delete].responses