-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathschema.json
273 lines (273 loc) · 7.1 KB
/
schema.json
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/DataDog/schema/main/service-catalog/v2/schema.json",
"title": "Service Definition Schema v2",
"description": "A service definition for providing additional service metadata and integrations v2",
"type": "object",
"properties": {
"schema-version": {
"description": "Schema version being used",
"examples": ["v2"],
"type": "string",
"default": "v2",
"enum": ["v2"]
},
"dd-service": {
"description": "Unique identifier of the service. Must be unique across all services, and is used to match with a service in Datadog",
"examples": ["my-service"],
"type": "string",
"minLength": 1
},
"team": {
"description": "Team that owns the service",
"examples": ["my-team"],
"type": "string",
"minLength": 1
},
"dd-team": {
"description": "Experimental feature. A Team handle that matches a Team in the Datadog Teams product.",
"examples": ["my-team"],
"type": "string",
"minLength": 1,
"pattern": "[^A-Z ]+"
},
"contacts": {
"description": "A list of contacts related to the services. ",
"type": "array",
"items": {
"$ref": "#/$defs/contact"
}
},
"links": {
"description": "A list of links related to the services. ",
"type": "array",
"items": {
"$ref": "#/$defs/link"
}
},
"repos": {
"description": "A list of code repositories related to the services. ",
"type": "array",
"items": {
"$ref": "#/$defs/repo"
}
},
"docs": {
"description": "A list of documentations related to the services. ",
"type": "array",
"items": {
"$ref": "#/$defs/doc"
}
},
"tags": {
"description": "A set of custom tags",
"examples": [["my:tag"]],
"type": "array",
"items": {
"type": "string"
}
},
"integrations": {
"description": "Third party integrations that Datadog supports",
"type": "object",
"properties": {
"pagerduty": {
"description": "pagerduty service url for the service",
"examples": ["https://my-org.pagerduty.com/service-directory/PMyService"],
"type": "string",
"pattern": "^(https?://)?[a-zA-Z\\d_\\-.]+\\.pagerduty\\.com/service-directory/(P[a-zA-Z\\d_\\-]+)/?$"
},
"opsgenie": {
"description": "Opsgenie integration for the service",
"type": "object",
"properties": {
"service-url": {
"description": "Opsgenie Service URL",
"examples": ["https://www.opsgenies.com/service/123e4567-e89b-12d3-a456-426614174000"],
"type": "string",
"pattern": "^(https?://)?[a-zA-Z\\d_\\-.]+\\.opsgenie\\.com/service/([a-zA-Z\\d_\\-]+)/?$"
},
"region": {
"description": "Opsgenie Instance Region",
"type": "string",
"examples": ["US", "EU"],
"enum": ["US", "EU"]
}
},
"required": ["service-url"],
"additionalProperties": false
}
},
"additionalProperties": false
},
"extensions": {
"description": "Custom extensions",
"type": "object",
"additionalProperties": true
}
},
"additionalProperties": false,
"required": ["schema-version", "dd-service"],
"$defs": {
"link": {
"additionalProperties": false,
"type": "object",
"properties": {
"name": {
"description": "Link name",
"examples": ["Runbook", "Dashboard"],
"type": "string",
"minLength": 1
},
"type": {
"description": "Link type",
"examples": ["runbook", "dashboard"],
"type": "string",
"enum": [
"doc",
"wiki",
"runbook",
"url",
"repo",
"dashboard",
"oncall",
"code",
"link"
]
},
"url": {
"description": "Link url",
"examples": ["https://my-runbook"],
"type": "string",
"format": "uri"
}
},
"required": [
"name",
"type",
"url"
]
},
"contact": {
"additionalProperties": false,
"type": "object",
"properties": {
"name": {
"description": "Contact name",
"examples": ["Oncall Slack", "Team Email"],
"type": "string",
"minLength": 2
},
"type": {
"description": "Contact type",
"examples": ["email", "slack", "microsoft-teams"],
"type": "string",
"enum": [
"email",
"slack",
"microsoft-teams"
]
},
"contact": {
"description": "Contact value",
"examples": ["[email protected]", "https://my-org.slack.com/archives/my-channel"],
"type": "string"
}
},
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "email"
}
}
},
"then": {
"properties": {
"contact": {
"format": "email"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "slack"
}
}
},
"then": {
"properties": {
"contact": {
"pattern": "^https://.+"
}
}
}
}
],
"required": [
"type",
"contact"
]
},
"doc": {
"additionalProperties": false,
"type": "object",
"properties": {
"name": {
"description": "Doc name",
"examples": ["Architecture", "RFC", "Design"],
"type": "string",
"minLength": 1
},
"provider": {
"description": "Doc provider",
"examples": ["google drive", "figma"],
"type": "string",
"minLength": 1
},
"url": {
"description": "Doc url",
"examples": ["https://gdrive/mydoc"],
"type": "string",
"format": "uri"
}
},
"required": [
"name",
"url"
]
},
"repo": {
"additionalProperties": false,
"type": "object",
"properties": {
"name": {
"description": "Repo name",
"examples": ["Source Code"],
"type": "string",
"minLength": 1
},
"provider": {
"description": "Repo provider",
"examples": ["Github"],
"type": "string",
"minLength": 1
},
"url": {
"description": "Repo url",
"examples": ["https://github.com/DataDog/schema"],
"type": "string",
"format": "uri"
}
},
"required": [
"name",
"url"
]
}
}
}