Demandbase · API Governance Rules

Demandbase API Rules

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

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

Rule Categories

demandbase

Rules

warn
demandbase-ip-base-url
Servers should reference api.demandbase.com or company-target.com.
$.servers[*].url
error
demandbase-ip-apikey-auth
IP API should declare apiKey authentication.
$.components.securitySchemes
warn
demandbase-ip-resource
IP API should expose /api/v3/ip.json.
$.paths

Spectral Ruleset

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