@test-org-th/omd-schema 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,344 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "title": "OMD Schema - Component",
4
+ "type": "object",
5
+ "required": [
6
+ "omd_service",
7
+ "omd_component",
8
+ "jira_project",
9
+ "schema_version",
10
+ "inventory_id"
11
+ ],
12
+ "properties": {
13
+ "omd_service": {
14
+ "type": "string"
15
+ },
16
+ "schema_version": {
17
+ "type": "string"
18
+ },
19
+ "inventory_id": {
20
+ "type": "string",
21
+ "const": "980162270ee0cf69c2e3a0a0a87dd93d-e8e885e0931c2c609d3059f840c02b70"
22
+ },
23
+ "omd_component": {
24
+ "title": "Component",
25
+ "description": "Name of an individual microservice, shared library, or other platform element (e.g. lambda, batch job, etc). The value must be unique across the ecosystem.",
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": [
29
+ "name",
30
+ "description",
31
+ "type",
32
+ "omd_compliance",
33
+ "omd_cell",
34
+ "sdm_owner_email",
35
+ "jira_team",
36
+ "omd_tier"
37
+ ],
38
+ "properties": {
39
+ "name": {
40
+ "title": "Component",
41
+ "type": "string",
42
+ "pattern": "^[a-z][a-z0-9_-]{0,61}[a-z0-9]$",
43
+ "errorMessage": "Component name should be starting with a lowercase letter, should not exceed 63 characters in length and can contain lowercase letters, numbers, underscores, and hyphens."
44
+ },
45
+ "description": {
46
+ "title": "Component description",
47
+ "type": "string"
48
+ },
49
+ "type": {
50
+ "title": "Type",
51
+ "description": "Expresses what the implementation of the omd_component is",
52
+ "type": "string",
53
+ "enum": [
54
+ "microservice",
55
+ "platform",
56
+ "library",
57
+ "sdk",
58
+ "front-end",
59
+ "infra",
60
+ "client-app",
61
+ "dashboard",
62
+ "serverless",
63
+ "infra-library",
64
+ "database",
65
+ "static-site"
66
+ ]
67
+ },
68
+ "omd_compliance": {
69
+ "title": "Compliance",
70
+ "description": "Metadata associated with the omd_component which identifies if the service and its underlying components are directly associated with regulatory/compliance concerns.",
71
+ "type": "string"
72
+ },
73
+ "omd_cell": {
74
+ "title": "Cell",
75
+ "description": "Describes runtime relationships between microservices. For the time being, omd_cell should match omd_service",
76
+ "type": "string",
77
+ "pattern": "^[a-z][a-z0-9_-]{0,61}[a-z0-9]$",
78
+ "errorMessage": "omd_cell should be starting with a lowercase letter, should not exceed 63 characters in length and can contain lowercase letters, numbers, underscores, and hyphens."
79
+ },
80
+ "subdivision_strategy": {
81
+ "title": "Subdivision Strategy",
82
+ "description": "A temporary tag in now.yaml describing the runtime deployment configuration of an OMD component that defines the mechanism for supporting multiple products across many regions. At deployment-time, this strategy is used to perform releases to specific subdivisions.",
83
+ "type": "string",
84
+ "enum": [
85
+ "global",
86
+ "market",
87
+ "tenant",
88
+ "tenant-market"
89
+ ]
90
+ },
91
+ "supported_markets": {
92
+ "title": "Supported Logical Markets",
93
+ "description": "An optional tag to indicate which logical markets the component is applicable.",
94
+ "type": "array",
95
+ "items": {
96
+ "type": "string",
97
+ "enum": [
98
+ "amer",
99
+ "apac",
100
+ "emea",
101
+ "latam"
102
+ ]
103
+ }
104
+ },
105
+ "deployment_strategy": {
106
+ "title": "Deployment Strategy",
107
+ "description": "This tag helps to describe the deployment of compute resources and infrastructure",
108
+ "type": "string",
109
+ "enum": [
110
+ "single",
111
+ "primary",
112
+ "all"
113
+ ]
114
+ },
115
+ "database_type": {
116
+ "title": "Database Type",
117
+ "description": "This tag helps to describe the type of the database",
118
+ "type": "string",
119
+ "enum": [
120
+ "aurora-pg",
121
+ "dynamodb",
122
+ "elasticache",
123
+ "mongodb"
124
+ ]
125
+ },
126
+ "replication_strategy": {
127
+ "title": "Replication Strategy",
128
+ "description": "This tag helps to describe the type of the database replication strategy",
129
+ "type": "string",
130
+ "enum": [
131
+ "global",
132
+ "market",
133
+ "none"
134
+ ]
135
+ },
136
+ "sdm_owner_email": {
137
+ "title": "SDM Owner Email",
138
+ "description": "The e-mail address of the WBD SDM/Director that owns the omd_component",
139
+ "type": "string"
140
+ },
141
+ "jira_team": {
142
+ "title": "JIRA Team",
143
+ "description": "The JIRA team name, who owns this component",
144
+ "type": "string"
145
+ },
146
+ "omd_tier": {
147
+ "title": "Tier",
148
+ "description": "Helps to identify the criticality of a component that can suggest operational support needed for each component/service, metrics to collect, SLAs, SLOs, etc",
149
+ "type": "string",
150
+ "enum": [
151
+ "undefined",
152
+ "not-applicable",
153
+ "tier-1",
154
+ "tier-2",
155
+ "tier-3",
156
+ "tier-4"
157
+ ]
158
+ },
159
+ "dependencies": {
160
+ "title": "Component Dependencies",
161
+ "description": "A tag used for linking dependencies between different components with any type",
162
+ "type": "array",
163
+ "uniqueItems": true,
164
+ "items": {
165
+ "type": "object",
166
+ "additionalProperties": false,
167
+ "required": [
168
+ "omd_service",
169
+ "omd_component"
170
+ ],
171
+ "properties": {
172
+ "omd_service": {
173
+ "title": "Service Name",
174
+ "type": "string"
175
+ },
176
+ "omd_component": {
177
+ "title": "Component Name",
178
+ "type": "string"
179
+ }
180
+ }
181
+ }
182
+ },
183
+ "paths": {
184
+ "title": "Paths",
185
+ "description": "The paths, where you can find specific part(s) of the component.",
186
+ "type": "object",
187
+ "additionalProperties": false,
188
+ "properties": {
189
+ "src": {
190
+ "title": "Source code",
191
+ "type": "array"
192
+ },
193
+ "infra": {
194
+ "title": "IAC code",
195
+ "type": "array"
196
+ },
197
+ "docs": {
198
+ "title": "Documentation",
199
+ "type": "array"
200
+ }
201
+ }
202
+ }
203
+ },
204
+ "allOf": [
205
+ {
206
+ "if": {
207
+ "properties": {
208
+ "type": {
209
+ "enum": [
210
+ "infra",
211
+ "database"
212
+ ]
213
+ }
214
+ }
215
+ },
216
+ "then": {
217
+ "required": [
218
+ "paths"
219
+ ],
220
+ "errorMessage": {
221
+ "required": {
222
+ "paths": "The paths configuration is required for infra and database components"
223
+ }
224
+ }
225
+ }
226
+ },
227
+ {
228
+ "if": {
229
+ "properties": {
230
+ "type": {
231
+ "enum": [
232
+ "infra",
233
+ "database"
234
+ ]
235
+ }
236
+ }
237
+ },
238
+ "then": {
239
+ "properties": {
240
+ "paths": {
241
+ "type": "object",
242
+ "required": [
243
+ "src"
244
+ ],
245
+ "errorMessage": {
246
+ "required": {
247
+ "src": "The paths.src field is required for infra and database components"
248
+ }
249
+ }
250
+ }
251
+ }
252
+ }
253
+ },
254
+ {
255
+ "if": {
256
+ "properties": {
257
+ "type": {
258
+ "enum": [
259
+ "infra",
260
+ "microservice",
261
+ "database"
262
+ ]
263
+ }
264
+ }
265
+ },
266
+ "then": {
267
+ "required": [
268
+ "subdivision_strategy",
269
+ "deployment_strategy"
270
+ ],
271
+ "errorMessage": {
272
+ "required": {
273
+ "subdivision_strategy": "Subdivision strategy is required for infra, microservice, and database type components",
274
+ "deployment_strategy": "Deployment strategy is required for infra, microservice, and database type components"
275
+ }
276
+ }
277
+ }
278
+ },
279
+ {
280
+ "if": {
281
+ "properties": {
282
+ "type": {
283
+ "enum": [
284
+ "database"
285
+ ]
286
+ }
287
+ }
288
+ },
289
+ "then": {
290
+ "required": [
291
+ "database_type",
292
+ "replication_strategy"
293
+ ],
294
+ "errorMessage": {
295
+ "required": {
296
+ "database_type": "Database Type is required for database type components",
297
+ "replication_strategy": "Replication Strategy is required for database type components"
298
+ }
299
+ }
300
+ },
301
+ "else": {
302
+ "not": {
303
+ "anyOf": [
304
+ {
305
+ "required": [
306
+ "database_type"
307
+ ]
308
+ },
309
+ {
310
+ "required": [
311
+ "replication_strategy"
312
+ ]
313
+ }
314
+ ]
315
+ },
316
+ "errorMessage": "Database-specific fields (database_type, replication_strategy) should not be present for non-database type components"
317
+ }
318
+ }
319
+ ]
320
+ },
321
+ "jira_project": {
322
+ "title": "Jira Project",
323
+ "description": "The JIRA project acronym and URL associated with the Jira board representing where work is tracked for the corresponding omd_component",
324
+ "type": "object",
325
+ "additionalProperties": false,
326
+ "required": [
327
+ "name",
328
+ "jira_board"
329
+ ],
330
+ "properties": {
331
+ "name": {
332
+ "title": "Name",
333
+ "description": "JIRA project acronym associated with the Jira board representing where work is tracked for the corresponding omd_component",
334
+ "type": "string"
335
+ },
336
+ "jira_board": {
337
+ "title": "Jira board URL",
338
+ "description": "URL associated with the Jira board representing where work is tracked for the corresponding omd_component",
339
+ "type": "string"
340
+ }
341
+ }
342
+ }
343
+ }
344
+ }
@@ -0,0 +1,345 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "title": "OMD Schema - Component",
4
+ "type": "object",
5
+ "required": [
6
+ "omd_service",
7
+ "omd_component",
8
+ "jira_project",
9
+ "schema_version",
10
+ "inventory_id"
11
+ ],
12
+ "properties": {
13
+ "omd_service": {
14
+ "type": "string"
15
+ },
16
+ "schema_version": {
17
+ "type": "string"
18
+ },
19
+ "inventory_id": {
20
+ "type": "string",
21
+ "const": "980162270ee0cf69c2e3a0a0a87dd93d-e8e885e0931c2c609d3059f840c02b70"
22
+ },
23
+ "omd_component": {
24
+ "title": "Component",
25
+ "description": "Name of an individual microservice, shared library, or other platform element (e.g. lambda, batch job, etc). The value must be unique across the ecosystem.",
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": [
29
+ "name",
30
+ "description",
31
+ "type",
32
+ "omd_compliance",
33
+ "omd_cell",
34
+ "sdm_owner_email",
35
+ "jira_team",
36
+ "omd_tier"
37
+ ],
38
+ "properties": {
39
+ "name": {
40
+ "title": "Component",
41
+ "type": "string",
42
+ "pattern": "^[a-z][a-z0-9_-]{0,61}[a-z0-9]$",
43
+ "errorMessage": "Component name should be starting with a lowercase letter, should not exceed 63 characters in length and can contain lowercase letters, numbers, underscores, and hyphens."
44
+ },
45
+ "description": {
46
+ "title": "Component description",
47
+ "type": "string"
48
+ },
49
+ "type": {
50
+ "title": "Type",
51
+ "description": "Expresses what the implementation of the omd_component is",
52
+ "type": "string",
53
+ "enum": [
54
+ "microservice",
55
+ "platform",
56
+ "library",
57
+ "sdk",
58
+ "front-end",
59
+ "infra",
60
+ "client-app",
61
+ "dashboard",
62
+ "serverless",
63
+ "infra-library",
64
+ "database",
65
+ "static-site"
66
+ ]
67
+ },
68
+ "omd_compliance": {
69
+ "title": "Compliance",
70
+ "description": "Metadata associated with the omd_component which identifies if the service and its underlying components are directly associated with regulatory/compliance concerns.",
71
+ "type": "string"
72
+ },
73
+ "omd_cell": {
74
+ "title": "Cell",
75
+ "description": "Describes runtime relationships between microservices. For the time being, omd_cell should match omd_service",
76
+ "type": "string",
77
+ "pattern": "^[a-z][a-z0-9_-]{0,61}[a-z0-9]$",
78
+ "errorMessage": "omd_cell should be starting with a lowercase letter, should not exceed 63 characters in length and can contain lowercase letters, numbers, underscores, and hyphens."
79
+ },
80
+ "subdivision_strategy": {
81
+ "title": "Subdivision Strategy",
82
+ "description": "A temporary tag in now.yaml describing the runtime deployment configuration of an OMD component that defines the mechanism for supporting multiple products across many regions. At deployment-time, this strategy is used to perform releases to specific subdivisions.",
83
+ "type": "string",
84
+ "enum": [
85
+ "global",
86
+ "market",
87
+ "tenant",
88
+ "tenant-market"
89
+ ]
90
+ },
91
+ "supported_markets": {
92
+ "title": "Supported Logical Markets",
93
+ "description": "An optional tag to indicate which logical markets the component is applicable.",
94
+ "type": "array",
95
+ "items": {
96
+ "type": "string",
97
+ "enum": [
98
+ "amer",
99
+ "apac",
100
+ "emea",
101
+ "latam"
102
+ ]
103
+ }
104
+ },
105
+ "deployment_strategy": {
106
+ "title": "Deployment Strategy",
107
+ "description": "This tag helps to describe the deployment of compute resources and infrastructure.",
108
+ "type": "string",
109
+ "enum": [
110
+ "single",
111
+ "primary",
112
+ "all",
113
+ "dual"
114
+ ]
115
+ },
116
+ "database_type": {
117
+ "title": "Database Type",
118
+ "description": "This tag helps to describe the type of the database",
119
+ "type": "string",
120
+ "enum": [
121
+ "aurora-pg",
122
+ "dynamodb",
123
+ "elasticache",
124
+ "mongodb"
125
+ ]
126
+ },
127
+ "replication_strategy": {
128
+ "title": "Replication Strategy",
129
+ "description": "This tag helps to describe the type of the database replication strategy",
130
+ "type": "string",
131
+ "enum": [
132
+ "global",
133
+ "market",
134
+ "none"
135
+ ]
136
+ },
137
+ "sdm_owner_email": {
138
+ "title": "SDM Owner Email",
139
+ "description": "The e-mail address of the WBD SDM/Director that owns the omd_component",
140
+ "type": "string"
141
+ },
142
+ "jira_team": {
143
+ "title": "JIRA Team",
144
+ "description": "The JIRA team name, who owns this component",
145
+ "type": "string"
146
+ },
147
+ "omd_tier": {
148
+ "title": "Tier",
149
+ "description": "Helps to identify the criticality of a component that can suggest operational support needed for each component/service, metrics to collect, SLAs, SLOs, etc",
150
+ "type": "string",
151
+ "enum": [
152
+ "undefined",
153
+ "not-applicable",
154
+ "tier-1",
155
+ "tier-2",
156
+ "tier-3",
157
+ "tier-4"
158
+ ]
159
+ },
160
+ "dependencies": {
161
+ "title": "Component Dependencies",
162
+ "description": "A tag used for linking dependencies between different components with any type",
163
+ "type": "array",
164
+ "uniqueItems": true,
165
+ "items": {
166
+ "type": "object",
167
+ "additionalProperties": false,
168
+ "required": [
169
+ "omd_service",
170
+ "omd_component"
171
+ ],
172
+ "properties": {
173
+ "omd_service": {
174
+ "title": "Service Name",
175
+ "type": "string"
176
+ },
177
+ "omd_component": {
178
+ "title": "Component Name",
179
+ "type": "string"
180
+ }
181
+ }
182
+ }
183
+ },
184
+ "paths": {
185
+ "title": "Paths",
186
+ "description": "The paths, where you can find specific part(s) of the component.",
187
+ "type": "object",
188
+ "additionalProperties": false,
189
+ "properties": {
190
+ "src": {
191
+ "title": "Source code",
192
+ "type": "array"
193
+ },
194
+ "infra": {
195
+ "title": "IAC code",
196
+ "type": "array"
197
+ },
198
+ "docs": {
199
+ "title": "Documentation",
200
+ "type": "array"
201
+ }
202
+ }
203
+ }
204
+ },
205
+ "allOf": [
206
+ {
207
+ "if": {
208
+ "properties": {
209
+ "type": {
210
+ "enum": [
211
+ "infra",
212
+ "database"
213
+ ]
214
+ }
215
+ }
216
+ },
217
+ "then": {
218
+ "required": [
219
+ "paths"
220
+ ],
221
+ "errorMessage": {
222
+ "required": {
223
+ "paths": "The paths configuration is required for infra and database components"
224
+ }
225
+ }
226
+ }
227
+ },
228
+ {
229
+ "if": {
230
+ "properties": {
231
+ "type": {
232
+ "enum": [
233
+ "infra",
234
+ "database"
235
+ ]
236
+ }
237
+ }
238
+ },
239
+ "then": {
240
+ "properties": {
241
+ "paths": {
242
+ "type": "object",
243
+ "required": [
244
+ "src"
245
+ ],
246
+ "errorMessage": {
247
+ "required": {
248
+ "src": "The paths.src field is required for infra and database components"
249
+ }
250
+ }
251
+ }
252
+ }
253
+ }
254
+ },
255
+ {
256
+ "if": {
257
+ "properties": {
258
+ "type": {
259
+ "enum": [
260
+ "infra",
261
+ "microservice",
262
+ "database"
263
+ ]
264
+ }
265
+ }
266
+ },
267
+ "then": {
268
+ "required": [
269
+ "subdivision_strategy",
270
+ "deployment_strategy"
271
+ ],
272
+ "errorMessage": {
273
+ "required": {
274
+ "subdivision_strategy": "Subdivision strategy is required for infra, microservice, and database type components",
275
+ "deployment_strategy": "Deployment strategy is required for infra, microservice, and database type components"
276
+ }
277
+ }
278
+ }
279
+ },
280
+ {
281
+ "if": {
282
+ "properties": {
283
+ "type": {
284
+ "enum": [
285
+ "database"
286
+ ]
287
+ }
288
+ }
289
+ },
290
+ "then": {
291
+ "required": [
292
+ "database_type",
293
+ "replication_strategy"
294
+ ],
295
+ "errorMessage": {
296
+ "required": {
297
+ "database_type": "Database Type is required for database type components",
298
+ "replication_strategy": "Replication Strategy is required for database type components"
299
+ }
300
+ }
301
+ },
302
+ "else": {
303
+ "not": {
304
+ "anyOf": [
305
+ {
306
+ "required": [
307
+ "database_type"
308
+ ]
309
+ },
310
+ {
311
+ "required": [
312
+ "replication_strategy"
313
+ ]
314
+ }
315
+ ]
316
+ },
317
+ "errorMessage": "Database-specific fields (database_type, replication_strategy) should not be present for non-database type components"
318
+ }
319
+ }
320
+ ]
321
+ },
322
+ "jira_project": {
323
+ "title": "Jira Project",
324
+ "description": "The JIRA project acronym and URL associated with the Jira board representing where work is tracked for the corresponding omd_component",
325
+ "type": "object",
326
+ "additionalProperties": false,
327
+ "required": [
328
+ "name",
329
+ "jira_board"
330
+ ],
331
+ "properties": {
332
+ "name": {
333
+ "title": "Name",
334
+ "description": "JIRA project acronym associated with the Jira board representing where work is tracked for the corresponding omd_component",
335
+ "type": "string"
336
+ },
337
+ "jira_board": {
338
+ "title": "Jira board URL",
339
+ "description": "URL associated with the Jira board representing where work is tracked for the corresponding omd_component",
340
+ "type": "string"
341
+ }
342
+ }
343
+ }
344
+ }
345
+ }