CNH · API Governance Rules
CNH API Rules
Spectral linting rules defining API design standards and conventions for CNH.
9 Rules
error 4
warn 4
info 1
Rule Categories
cnh
Rules
error
cnh-info-contact
API contact information must be present.
$.info
error
cnh-server-https
All server URLs must use HTTPS.
$.servers[*].url
warn
cnh-server-host
Production server should target api.fieldops.cnh.com or api.cnh.com.
$.servers[*].url
error
cnh-oauth-security
An OAuth 2.0 security scheme must be defined.
$.components.securitySchemes[*]
error
cnh-operation-id
Every operation must declare a unique operationId.
$.paths[*][get,post,put,patch,delete]
warn
cnh-operation-tags
Operations must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
cnh-telemetry-date-range
Telemetry GET operations must accept startDate and endDate query parameters (one-day window recommended).
$.paths[?(@property && @property.indexOf('/telemetry') > -1 || @property.indexOf('/metrics') > -1)].get
info
cnh-iso15143-profile
Telemetry endpoints should expose a `profile` parameter restricted to CP or MH.
$.paths[?(@property && @property.indexOf('/telemetry') > -1)].get.parameters[?(@.name == 'profile')].schema
warn
cnh-error-401
Operations should declare 401 Unauthorized response.
$.paths[*][get,post,put,patch,delete].responses