Demandbase · API Governance Rules

Demandbase API Rules

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

4 Rules error 1 warn 2 info 1
View Rules File View on GitHub

Rule Categories

demandbase

Rules

warn
demandbase-account-list-base-url
Servers should reference api.demandbase.com.
$.servers[*].url
error
demandbase-account-list-apikey-auth
Account List API should declare apiKey authentication.
$.components.securitySchemes
warn
demandbase-account-list-resource
API should expose /lists as a primary resource.
$.paths
info
demandbase-account-list-sync
API should expose CRM sync capability.
$.paths

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas
rules:
  demandbase-account-list-base-url:
    description: Servers should reference api.demandbase.com.
    given: $.servers[*].url
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "demandbase\\.com"
  demandbase-account-list-apikey-auth:
    description: Account List API should declare apiKey authentication.
    given: $.components.securitySchemes
    severity: error
    then:
      field: apiKeyAuth
      function: truthy
  demandbase-account-list-resource:
    description: API should expose /lists as a primary resource.
    given: $.paths
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "/lists"
  demandbase-account-list-sync:
    description: API should expose CRM sync capability.
    given: $.paths
    severity: info
    then:
      function: pattern
      functionOptions:
        match: "sync"