Onfleet · API Governance Rules
Onfleet API Rules
Spectral linting rules defining API design standards and conventions for Onfleet.
8 Rules
error 3
warn 5
Rule Categories
geojson
no
operation
resource
security
servers
unix
Rules
warn
operation-summary-title-case
Operation summaries must use Title Case.
$.paths[*][get,post,put,delete,patch].summary
warn
operation-id-camel-case
operationId must be camelCase.
$.paths[*][get,post,put,delete,patch].operationId
error
servers-base-path-v2
Onfleet base URL must use /api/v2 path.
$.servers[*].url
error
security-basic-auth-required
Onfleet APIs must declare basic auth as the default security scheme.
$
warn
geojson-coordinates-array
Geographic coordinates must be modelled as GeoJSON [longitude, latitude].
$..properties[?(@property === 'location')]
warn
unix-millisecond-timestamps
Timestamps must be int64 unix milliseconds.
$..properties[?(@property.match(/^(time|timeCreated|timeLastModified|completeAfter|completeBefore|startTime|endTime|eta)$/))]
warn
resource-id-string
Resource id fields must be string.
$..properties.id
error
no-trailing-slash
Path templates must not end with a trailing slash.
$.paths