Interswitch · API Governance Rules
Interswitch API Rules
Spectral linting rules defining API design standards and conventions for Interswitch.
9 Rules
error 3
warn 3
info 3
Rule Categories
interswitch
Rules
error
interswitch-title-required
All Interswitch OpenAPI specs must have an info.title prefixed with "Interswitch".
$.info.title
error
interswitch-server-https
Servers MUST use HTTPS.
$.servers[*].url
warn
interswitch-sandbox-server
At least one server should reference the Interswitch sandbox / QA host.
$.servers[*].url
warn
interswitch-operation-summary
Every operation needs a Title Case summary.
$.paths.*[get,post,put,patch,delete].summary
error
interswitch-operation-id
Every operation needs an operationId in camelCase.
$.paths.*[get,post,put,patch,delete].operationId
warn
interswitch-bearer-or-interswitch-auth
Security schemes should declare either Bearer (OAuth) or InterswitchAuth.
$.components.securitySchemes.*
info
interswitch-money-minor-units
Amount fields should be expressed in minor currency units (integer kobo for NGN).
$.paths..*[?(@property === 'amount' || @property === 'refundAmount' || @property === 'balance')].type
info
interswitch-response-codes-string
Interswitch response codes are 5-character strings (e.g. 90000), not integers.
$.paths..*[?(@property === 'responseCode')].type
info
interswitch-webhook-signature-header
Webhook surfaces should document the X-Interswitch-Signature header.
$..parameters[?(@.in == 'header' && @.name == 'X-Interswitch-Signature')]