-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemandbase-api-rules.yml
More file actions
40 lines (40 loc) · 1.05 KB
/
demandbase-api-rules.yml
File metadata and controls
40 lines (40 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
extends:
- spectral:oas
rules:
demandbase-info-contact:
description: API info should include Demandbase support contact.
given: $.info
severity: warn
then:
field: contact
function: truthy
demandbase-base-url:
description: Servers should reference api.demandbase.com.
given: $.servers[*].url
severity: warn
then:
function: pattern
functionOptions:
match: "demandbase\\.com"
demandbase-apikey-auth:
description: API should declare apiKey authentication.
given: $.components.securitySchemes
severity: error
then:
field: apiKeyAuth
function: truthy
demandbase-operation-tags:
description: Operations should be tagged Accounts, Enrichment, Firmographics, etc.
given: $.paths[*][*]
severity: warn
then:
field: tags
function: truthy
demandbase-accounts-resource:
description: API should expose /accounts as a primary resource.
given: $.paths
severity: warn
then:
function: pattern
functionOptions:
match: "/accounts"