Dun & Bradstreet · API Governance Rules
Dun & Bradstreet API Rules
Spectral linting rules defining API design standards and conventions for Dun & Bradstreet.
Dun & Bradstreet API Rules is a Spectral governance ruleset published by Dun & Bradstreet on the APIs.io network, containing 8 lint rules.
The ruleset includes 3 error-severity rules, 4 warning-severity rules, and 1 info-severity rule.
Tagged areas include Business Data, Company Data, D-U-N-S Number, Credit, and Risk.
Rulesets can be applied to your own OpenAPI specs via Spectral to enforce the same governance standards.
8 Rules
error 3
warn 4
info 1
Rule Categories
dnb
Rules
warn
dnb-duns-field-name
Identifier for a business should use the field name `duns`.
$.components.schemas..properties
error
dnb-operation-id-camel-case
Direct+ operationIds are lowerCamelCase verbs.
$.paths.*[get,post,put,delete,patch]
warn
dnb-tags-title-case
Tags use Title Case.
$.tags[*].name
warn
dnb-summary-title-case
Operation summaries use Title Case.
$.paths.*[get,post,put,delete,patch].summary
error
dnb-bearer-auth-required
All non-token operations must require bearer auth.
$.paths[?(@property != "/v3/token")].*[get,post,put,delete,patch]
error
dnb-version-in-path
Direct+ paths must be prefixed with /v{n}/.
$.paths
warn
dnb-country-code-iso2
Country codes use ISO 3166-1 alpha-2 (countryISOAlpha2Code).
$..parameters[?(@.name == 'country' || @.name == 'countryCode')]
info
dnb-pagination-page-size
Paginated list endpoints expose pageNumber and pageSize.
$.paths[?(@property =~ /search/)].get.parameters[*].name