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-rtid-base-url
Servers should reference api.company-target.com or api.demandbase.com.
$.servers[*].url
error
demandbase-rtid-apikey-auth
Real-Time Identification API should declare apiKey authentication.
$.components.securitySchemes
warn
demandbase-rtid-ip-resource
Real-Time Identification API should expose /api/v3/ip.json.
$.paths
warn
demandbase-rtid-domain-resource
Real-Time Identification API should expose /api/v3/domain.json.
$.paths

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas
rules:
  demandbase-rtid-base-url:
    description: Servers should reference api.company-target.com or api.demandbase.com.
    given: $.servers[*].url
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "(company-target|demandbase)\\.com"
  demandbase-rtid-apikey-auth:
    description: Real-Time Identification API should declare apiKey authentication.
    given: $.components.securitySchemes
    severity: error
    then:
      field: apiKeyAuth
      function: truthy
  demandbase-rtid-ip-resource:
    description: Real-Time Identification API should expose /api/v3/ip.json.
    given: $.paths
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "ip"
  demandbase-rtid-domain-resource:
    description: Real-Time Identification API should expose /api/v3/domain.json.
    given: $.paths
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "domain"