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-advertising-base-url
Servers should reference api.demandbase.com.
$.servers[*].url
error
demandbase-advertising-apikey-auth
Advertising API should declare apiKey authentication.
$.components.securitySchemes
warn
demandbase-advertising-campaigns-resource
Advertising API should expose /campaigns.
$.paths
warn
demandbase-advertising-audiences-resource
Advertising API should expose /audiences.
$.paths

Spectral Ruleset

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