Demandbase · API Governance Rules

Demandbase API Rules

Spectral linting rules defining API design standards and conventions for Demandbase.

4 Rules error 1 warn 3
View Rules File View on GitHub

Rule Categories

demandbase

Rules

warn
demandbase-b2b-data-base-url
Servers should reference api.demandbase.com.
$.servers[*].url
error
demandbase-b2b-data-apikey-auth
B2B Data API should declare apiKey authentication.
$.components.securitySchemes
warn
demandbase-b2b-data-companies-resource
B2B Data API should expose /companies.
$.paths
warn
demandbase-b2b-data-contacts-resource
B2B Data API should expose /contacts.
$.paths

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas
rules:
  demandbase-b2b-data-base-url:
    description: Servers should reference api.demandbase.com.
    given: $.servers[*].url
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "demandbase\\.com"
  demandbase-b2b-data-apikey-auth:
    description: B2B Data API should declare apiKey authentication.
    given: $.components.securitySchemes
    severity: error
    then:
      field: apiKeyAuth
      function: truthy
  demandbase-b2b-data-companies-resource:
    description: B2B Data API should expose /companies.
    given: $.paths
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "/companies"
  demandbase-b2b-data-contacts-resource:
    description: B2B Data API should expose /contacts.
    given: $.paths
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "/contacts"