extends: - spectral:oas rules: demandbase-engagement-base-url: description: Servers should reference api.demandbase.com. given: $.servers[*].url severity: warn then: function: pattern functionOptions: match: "demandbase\\.com" demandbase-engagement-apikey-auth: description: Engagement API should declare apiKey authentication. given: $.components.securitySchemes severity: error then: field: apiKeyAuth function: truthy demandbase-engagement-account-resource: description: Engagement API should expose /accounts/{accountId}/engagement. given: $.paths severity: warn then: function: pattern functionOptions: match: "engagement" demandbase-engagement-webhooks: description: Engagement API should expose /webhooks. given: $.paths severity: warn then: function: pattern functionOptions: match: "/webhooks"