NCR · API Governance Rules
NCR API Rules
Spectral linting rules defining API design standards and conventions for NCR.
37 Rules
error 11
warn 18
info 8
Rule Categories
delete
get
global
info
no
openapi
operation
parameter
path
request
response
schema
security
server
servers
tag
Rules
warn
info-title-ncr-voyix
API title should identify NCR Voyix.
$.info.title
warn
info-description-required
A meaningful info.description is required.
$.info
error
info-version-required
An API version is required.
$.info
info
info-contact-required
Contact information should be present.
$.info
info
info-license-required
License information should be present.
$.info
error
openapi-version-3
Specs must use OpenAPI 3.0.x.
$.openapi
error
servers-defined
At least one server must be defined.
$.servers
error
server-https-only
Server URLs must use HTTPS.
$.servers[*].url
warn
server-description-required
Each server should have a description (e.g. Production vs Staging).
$.servers[*]
warn
path-kebab-case
Path segments should be lowercase kebab-case (parameters excepted).
$.paths[*]~
warn
path-no-trailing-slash
Paths should not end with a trailing slash.
$.paths[*]~
error
path-no-query-string
Paths must not contain query strings.
$.paths[*]~
error
operation-operationid-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-operationid-camel-case
operationId should be camelCase with a verb prefix (get/list/create/put/update/find/delete/add/remove/authenticate/exchange/set).
$.paths[*][get,post,put,patch,delete].operationId
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-ncr-voyix-prefix
Operation summaries should be prefixed with 'NCR Voyix'.
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
warn
operation-tags-required
Every operation must be tagged.
$.paths[*][get,post,put,patch,delete]
warn
global-tags-defined
A global tags array should be defined with descriptions.
$
warn
tag-description-required
Each global tag should have a description.
$.tags[*]
warn
tag-title-case
Tags should be Title Case single words (Catalog, Order, Site, Security, Provisioning, Selling, Category).
$.tags[*].name
warn
parameter-description-required
Parameters should have descriptions.
$.paths[*][get,post,put,patch,delete].parameters[*]
error
parameter-schema-required
Parameters must declare a schema with a type.
$.paths[*][get,post,put,patch,delete].parameters[*]
info
parameter-nep-headers-kebab
NCR Voyix scoping headers use the nep- prefix (nep-organization, nep-enterprise-unit, nep-application-key, nep-correlation-id).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='header')].name
warn
request-body-json
Request bodies should offer application/json.
$.paths[*][post,put,patch].requestBody.content
error
response-success-defined
Each operation must define at least one 2xx response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-description-required
Each response must have a description.
$.paths[*][get,post,put,patch,delete].responses[*]
info
response-mutation-error-coverage
Read/get operations should document a 404 Not Found.
$.paths[*].get.responses
warn
schema-property-camel-case
Schema properties should be camelCase (itemCode, enterpriseUnitName, shortDescription).
$.components.schemas[*].properties[*]~
info
schema-status-enum
Status fields should be the ACTIVE/INACTIVE enum.
$.components.schemas.Status
info
schema-version-for-optimistic-concurrency
Mutable resources should carry a numeric version for optimistic concurrency.
$.components.schemas[?(@.properties && @.properties.version)].properties.version
error
global-security-defined
A global security requirement must be declared.
$
warn
security-scheme-accesskey-hmac
The AccessKey (HMAC) security scheme must be defined and described.
$.components.securitySchemes.hmacAccessKey
error
get-no-request-body
GET operations must not declare a request body.
$.paths[*].get
info
delete-no-success-body-204
DELETE operations should be able to return 204 No Content.
$.paths[*].delete.responses
warn
no-empty-descriptions
Descriptions must not be empty.
$..description
info
operation-examples-encouraged
Operations should provide examples for mocking (Microcks).
$.paths[*][get,post,put,patch,delete]