@toolproof-core/schema 1.0.0 → 1.0.1

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.
Files changed (78) hide show
  1. package/dist/generated/types/standalone/Resource_Genesis.d.ts +3 -0
  2. package/dist/generated/types/standalone/Resource_Job.d.ts +3 -0
  3. package/dist/generated/types/standalone/Resource_RawStrategy.d.ts +3 -0
  4. package/dist/generated/types/standalone/Resource_ResourceType.d.ts +3 -0
  5. package/dist/generated/types/standalone/Resource_RunnableStrategy.d.ts +3 -0
  6. package/dist/generated/types/types.d.ts +487 -548
  7. package/dist/scripts/_lib/config.d.ts +12 -6
  8. package/dist/scripts/_lib/config.js +33 -15
  9. package/dist/scripts/{extractSchemas.js → extractSchemasFromResourceTypeShells.js} +14 -27
  10. package/dist/scripts/generateDependencies.js +2 -2
  11. package/dist/scripts/generateSchemaShims.js +22 -4
  12. package/dist/scripts/{extractSubSchemaWithDefs.js → generateStandaloneSchema.js} +12 -34
  13. package/dist/scripts/{generateResourceTypeType.js → generateStandaloneType.js} +23 -14
  14. package/dist/scripts/generateTypes.js +1 -1
  15. package/dist/scripts/{rewriteAnchors.js → normalizeAnchorsToPointers.js} +2 -2
  16. package/dist/scripts/{generateResourceShells.js → wrapResourceTypesWithResourceShells.js} +12 -34
  17. package/package.json +8 -8
  18. package/src/Genesis.json +44 -87
  19. package/src/generated/{dependencies.json → dependencyMap.json} +207 -214
  20. package/src/generated/{resourceTypes → normalized}/Genesis.json +44 -87
  21. package/src/generated/resources/Genesis.json +415 -478
  22. package/src/generated/schemas/Genesis.json +1026 -1057
  23. package/src/generated/schemas/{Goal.json → standalone/Goal.json} +34 -34
  24. package/src/generated/schemas/{Job.json → standalone/Job.json} +85 -85
  25. package/src/generated/schemas/{RawStrategy.json → standalone/RawStrategy.json} +238 -263
  26. package/src/generated/schemas/{ResourceType.json → standalone/ResourceType.json} +60 -60
  27. package/src/generated/schemas/{RunnableStrategy.json → standalone/RunnableStrategy.json} +296 -321
  28. package/src/generated/schemas/{StrategyRun.json → standalone/StrategyRun.json} +390 -421
  29. package/src/generated/types/standalone/Resource_Genesis.d.ts +3 -0
  30. package/src/generated/types/standalone/Resource_Job.d.ts +3 -0
  31. package/src/generated/types/standalone/Resource_RawStrategy.d.ts +3 -0
  32. package/src/generated/types/standalone/Resource_ResourceType.d.ts +3 -0
  33. package/src/generated/types/standalone/Resource_RunnableStrategy.d.ts +3 -0
  34. package/src/generated/types/types.d.ts +487 -548
  35. package/src/generated/types/types.js +1 -1
  36. package/src/scripts/_lib/config.ts +42 -18
  37. package/src/scripts/extractSchemasFromResourceTypeShells.ts +218 -0
  38. package/src/scripts/generateDependencies.ts +2 -2
  39. package/src/scripts/generateSchemaShims.ts +24 -4
  40. package/src/scripts/{extractSubSchemaWithDefs.ts → generateStandaloneSchema.ts} +13 -34
  41. package/src/scripts/{generateResourceTypeType.ts → generateStandaloneType.ts} +23 -14
  42. package/src/scripts/generateTypes.ts +1 -1
  43. package/src/scripts/{rewriteAnchors.ts → normalizeAnchorsToPointers.ts} +3 -3
  44. package/src/scripts/{generateResourceShells.ts → wrapResourceTypesWithResourceShells.ts} +13 -34
  45. package/dist/generated/types/Resource_Genesis.d.ts +0 -3
  46. package/dist/generated/types/Resource_Job.d.ts +0 -3
  47. package/dist/generated/types/Resource_RawStrategy.d.ts +0 -3
  48. package/dist/generated/types/Resource_ResourceType.d.ts +0 -3
  49. package/dist/generated/types/Resource_RunnableStrategy.d.ts +0 -3
  50. package/src/Roadmap.json +0 -102
  51. package/src/generated/types/Resource_Genesis.d.ts +0 -3
  52. package/src/generated/types/Resource_Job.d.ts +0 -3
  53. package/src/generated/types/Resource_RawStrategy.d.ts +0 -3
  54. package/src/generated/types/Resource_ResourceType.d.ts +0 -3
  55. package/src/generated/types/Resource_RunnableStrategy.d.ts +0 -3
  56. package/src/scripts/extractSchemas.ts +0 -229
  57. /package/dist/generated/types/{Resource_Genesis.js → standalone/Resource_Genesis.js} +0 -0
  58. /package/dist/generated/types/{Resource_Job.js → standalone/Resource_Job.js} +0 -0
  59. /package/dist/generated/types/{Resource_RawStrategy.js → standalone/Resource_RawStrategy.js} +0 -0
  60. /package/dist/generated/types/{Resource_ResourceType.js → standalone/Resource_ResourceType.js} +0 -0
  61. /package/dist/generated/types/{Resource_RunnableStrategy.js → standalone/Resource_RunnableStrategy.js} +0 -0
  62. /package/dist/scripts/{extractSchemas.d.ts → extractSchemasFromResourceTypeShells.d.ts} +0 -0
  63. /package/dist/scripts/{extractSubSchemaWithDefs.d.ts → generateStandaloneSchema.d.ts} +0 -0
  64. /package/dist/scripts/{generateResourceShells.d.ts → generateStandaloneType.d.ts} +0 -0
  65. /package/dist/scripts/{generateResourceTypeType.d.ts → normalizeAnchorsToPointers.d.ts} +0 -0
  66. /package/dist/scripts/{rewriteAnchors.d.ts → wrapResourceTypesWithResourceShells.d.ts} +0 -0
  67. /package/src/generated/{resourceTypes → normalized}/Genesis.ts +0 -0
  68. /package/src/generated/schemas/{Goal.ts → standalone/Goal.ts} +0 -0
  69. /package/src/generated/schemas/{Job.ts → standalone/Job.ts} +0 -0
  70. /package/src/generated/schemas/{RawStrategy.ts → standalone/RawStrategy.ts} +0 -0
  71. /package/src/generated/schemas/{ResourceType.ts → standalone/ResourceType.ts} +0 -0
  72. /package/src/generated/schemas/{RunnableStrategy.ts → standalone/RunnableStrategy.ts} +0 -0
  73. /package/src/generated/schemas/{StrategyRun.ts → standalone/StrategyRun.ts} +0 -0
  74. /package/src/generated/types/{Resource_Genesis.js → standalone/Resource_Genesis.js} +0 -0
  75. /package/src/generated/types/{Resource_Job.js → standalone/Resource_Job.js} +0 -0
  76. /package/src/generated/types/{Resource_RawStrategy.js → standalone/Resource_RawStrategy.js} +0 -0
  77. /package/src/generated/types/{Resource_ResourceType.js → standalone/Resource_ResourceType.js} +0 -0
  78. /package/src/generated/types/{Resource_RunnableStrategy.js → standalone/Resource_RunnableStrategy.js} +0 -0
@@ -1,15 +1,10 @@
1
1
  {
2
+ "$anchor": "RunnableStrategy",
2
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
4
  "type": "object",
4
- "allOf": [
5
- {
6
- "$comment": "The Engine runs jobs specified by steps in strategyThreadMap. The Engine also injects repeted steps when encountering loops.",
7
- "$ref": "#/$defs/StrategyThreadMapFacet"
8
- },
9
- {
10
- "$comment": "The Engine updates strategyState with materialized Resources upon job completions and runtime-provided input events. It also inserts input-potential and output-potential Resources upon step injections.",
11
- "$ref": "#/$defs/StrategyStateFacet"
12
- }
5
+ "required": [
6
+ "identity",
7
+ "runnableStrategyContext"
13
8
  ],
14
9
  "properties": {
15
10
  "identity": {
@@ -19,139 +14,145 @@
19
14
  "$ref": "#/$defs/RunnableStrategyContext"
20
15
  }
21
16
  },
22
- "required": [
23
- "identity",
24
- "runnableStrategyContext"
17
+ "allOf": [
18
+ {
19
+ "$comment": "The Engine runs jobs specified by steps in strategyThreadMap. The Engine also injects repeted steps when encountering loops.",
20
+ "$ref": "#/$defs/StrategyThreadMapFacet"
21
+ },
22
+ {
23
+ "$comment": "The Engine updates strategyState with materialized Resources upon job completions and runtime-provided input events. It also inserts input-potential and output-potential Resources upon step injections.",
24
+ "$ref": "#/$defs/StrategyStateFacet"
25
+ }
25
26
  ],
26
27
  "unevaluatedProperties": false,
27
- "$anchor": "RunnableStrategy",
28
28
  "$defs": {
29
- "StrategyThreadMapFacet": {
29
+ "RunnableStrategyIdentity": {
30
+ "$anchor": "RunnableStrategyIdentity",
31
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
32
+ "type": "string",
33
+ "pattern": "^RUNNABLE_STRATEGY-.+$"
34
+ },
35
+ "RunnableStrategyContext": {
36
+ "$anchor": "RunnableStrategyContext",
30
37
  "$schema": "https://json-schema.org/draft/2020-12/schema",
31
38
  "type": "object",
39
+ "required": [
40
+ "status"
41
+ ],
32
42
  "properties": {
33
- "strategyThreadMap": {
34
- "$ref": "#/$defs/StrategyThreadMap"
43
+ "status": {
44
+ "$ref": "#/$defs/RunnableStrategyStatus"
45
+ },
46
+ "startedAt": {
47
+ "$ref": "#/$defs/Timestamp"
48
+ },
49
+ "completedAt": {
50
+ "$ref": "#/$defs/Timestamp"
35
51
  }
36
52
  },
53
+ "unevaluatedProperties": false
54
+ },
55
+ "StrategyThreadMapFacet": {
56
+ "$anchor": "StrategyThreadMapFacet",
57
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
58
+ "type": "object",
37
59
  "required": [
38
60
  "strategyThreadMap"
39
61
  ],
40
- "$anchor": "StrategyThreadMapFacet"
62
+ "properties": {
63
+ "strategyThreadMap": {
64
+ "$ref": "#/$defs/StrategyThreadMap"
65
+ }
66
+ }
41
67
  },
42
68
  "StrategyStateFacet": {
69
+ "$anchor": "StrategyStateFacet",
43
70
  "$schema": "https://json-schema.org/draft/2020-12/schema",
44
71
  "type": "object",
72
+ "required": [
73
+ "strategyState"
74
+ ],
45
75
  "properties": {
46
76
  "strategyState": {
47
77
  "$ref": "#/$defs/StrategyState"
48
78
  }
49
- },
50
- "required": [
51
- "strategyState"
52
- ],
53
- "$anchor": "StrategyStateFacet"
79
+ }
54
80
  },
55
- "RunnableStrategyIdentity": {
81
+ "RunnableStrategyStatus": {
82
+ "$anchor": "RunnableStrategyStatus",
56
83
  "$schema": "https://json-schema.org/draft/2020-12/schema",
57
84
  "type": "string",
58
- "$anchor": "RunnableStrategyIdentity",
59
- "pattern": "^RUNNABLE_STRATEGY-.+$"
85
+ "enum": [
86
+ "pending",
87
+ "running",
88
+ "completed",
89
+ "failed",
90
+ "cancelled"
91
+ ]
60
92
  },
61
- "RunnableStrategyContext": {
93
+ "Timestamp": {
94
+ "$anchor": "Timestamp",
62
95
  "$schema": "https://json-schema.org/draft/2020-12/schema",
63
- "type": "object",
64
- "properties": {
65
- "completedAt": {
66
- "$ref": "#/$defs/Timestamp"
67
- },
68
- "startedAt": {
69
- "$ref": "#/$defs/Timestamp"
70
- },
71
- "status": {
72
- "$ref": "#/$defs/RunnableStrategyStatus"
73
- }
74
- },
75
- "required": [
76
- "status"
77
- ],
78
- "unevaluatedProperties": false,
79
- "$anchor": "RunnableStrategyContext"
96
+ "type": "string",
97
+ "format": "date-time"
80
98
  },
81
99
  "StrategyThreadMap": {
100
+ "$anchor": "StrategyThreadMap",
82
101
  "$schema": "https://json-schema.org/draft/2020-12/schema",
83
102
  "type": "object",
103
+ "propertyNames": {
104
+ "$ref": "#/$defs/StrategyThreadIdentity"
105
+ },
84
106
  "additionalProperties": {
85
107
  "$ref": "#/$defs/StepArray"
86
108
  },
87
- "$anchor": "StrategyThreadMap",
88
- "$comment": "Each thread contains an array of steps, allowing for sequential execution within a thread while supporting parallel execution across multiple threads.",
89
- "propertyNames": {
90
- "$ref": "#/$defs/StrategyThreadIdentity"
91
- }
109
+ "$comment": "Each thread contains an array of steps, allowing for sequential execution within a thread while supporting parallel execution across multiple threads."
92
110
  },
93
111
  "StrategyState": {
112
+ "$anchor": "StrategyState",
94
113
  "$schema": "https://json-schema.org/draft/2020-12/schema",
95
114
  "type": "object",
96
- "additionalProperties": {
97
- "$ref": "#/$defs/JobRunSocket"
98
- },
99
- "$anchor": "StrategyState",
100
115
  "propertyNames": {
101
- "$ref": "#/$defs/JobRunIdentity"
116
+ "$ref": "#/$defs/JobStepIdentity"
117
+ },
118
+ "additionalProperties": {
119
+ "$ref": "#/$defs/JobStepSocket"
102
120
  }
103
121
  },
104
- "Timestamp": {
105
- "$schema": "https://json-schema.org/draft/2020-12/schema",
106
- "type": "string",
107
- "$anchor": "Timestamp",
108
- "format": "date-time"
109
- },
110
- "RunnableStrategyStatus": {
122
+ "StrategyThreadIdentity": {
123
+ "$anchor": "StrategyThreadIdentity",
111
124
  "$schema": "https://json-schema.org/draft/2020-12/schema",
112
125
  "type": "string",
113
- "$anchor": "RunnableStrategyStatus",
114
- "enum": [
115
- "pending",
116
- "running",
117
- "completed",
118
- "failed",
119
- "cancelled"
120
- ]
126
+ "pattern": "^STRATEGY_THREAD-.+$"
121
127
  },
122
128
  "StepArray": {
129
+ "$anchor": "StepArray",
123
130
  "$schema": "https://json-schema.org/draft/2020-12/schema",
124
131
  "type": "array",
125
- "$anchor": "StepArray",
126
132
  "items": {
127
133
  "$ref": "#/$defs/Step"
128
134
  },
129
135
  "uniqueItems": true
130
136
  },
131
- "StrategyThreadIdentity": {
137
+ "JobStepIdentity": {
138
+ "$anchor": "JobStepIdentity",
132
139
  "$schema": "https://json-schema.org/draft/2020-12/schema",
133
140
  "type": "string",
134
- "$anchor": "StrategyThreadIdentity",
135
- "pattern": "^STRATEGY_THREAD-.+$"
141
+ "pattern": "^JOB_STEP-.+$"
136
142
  },
137
- "JobRunSocket": {
143
+ "JobStepSocket": {
144
+ "$anchor": "JobStepSocket",
138
145
  "$schema": "https://json-schema.org/draft/2020-12/schema",
139
146
  "type": "object",
140
- "additionalProperties": {
141
- "$ref": "#/$defs/Resource"
142
- },
143
- "$anchor": "JobRunSocket",
144
147
  "propertyNames": {
145
148
  "$ref": "#/$defs/ResourceRoleIdentity"
149
+ },
150
+ "additionalProperties": {
151
+ "$ref": "#/$defs/Resource"
146
152
  }
147
153
  },
148
- "JobRunIdentity": {
149
- "$schema": "https://json-schema.org/draft/2020-12/schema",
150
- "type": "string",
151
- "$anchor": "JobRunIdentity",
152
- "pattern": "^JobRun-.+$"
153
- },
154
154
  "Step": {
155
+ "$anchor": "Step",
155
156
  "$schema": "https://json-schema.org/draft/2020-12/schema",
156
157
  "type": "object",
157
158
  "oneOf": [
@@ -168,10 +169,16 @@
168
169
  "$ref": "#/$defs/ForStep"
169
170
  }
170
171
  ],
171
- "unevaluatedProperties": false,
172
- "$anchor": "Step"
172
+ "unevaluatedProperties": false
173
+ },
174
+ "ResourceRoleIdentity": {
175
+ "$anchor": "ResourceRoleIdentity",
176
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
177
+ "type": "string",
178
+ "pattern": "^ROLE-.+$"
173
179
  },
174
180
  "Resource": {
181
+ "$anchor": "Resource",
175
182
  "$schema": "https://json-schema.org/draft/2020-12/schema",
176
183
  "type": "object",
177
184
  "oneOf": [
@@ -188,49 +195,52 @@
188
195
  "$ref": "#/$defs/ResourceMaterialized"
189
196
  }
190
197
  ],
191
- "unevaluatedProperties": false,
192
- "$anchor": "Resource"
193
- },
194
- "ResourceRoleIdentity": {
195
- "$schema": "https://json-schema.org/draft/2020-12/schema",
196
- "type": "string",
197
- "$anchor": "ResourceRoleIdentity",
198
- "pattern": "^ROLE-.+$"
198
+ "unevaluatedProperties": false
199
199
  },
200
200
  "JobStep": {
201
+ "$anchor": "JobStep",
201
202
  "$schema": "https://json-schema.org/draft/2020-12/schema",
202
203
  "type": "object",
203
- "allOf": [
204
- {
205
- "$ref": "#/$defs/StepKindFacet"
206
- }
204
+ "required": [
205
+ "identity",
206
+ "jobHandle"
207
207
  ],
208
208
  "properties": {
209
209
  "identity": {
210
210
  "$ref": "#/$defs/JobStepIdentity"
211
211
  },
212
- "jobRun": {
213
- "$ref": "#/$defs/JobRun"
214
- },
215
212
  "stepKind": {
216
213
  "const": "job"
214
+ },
215
+ "jobHandle": {
216
+ "$ref": "#/$defs/JobIdentity"
217
217
  }
218
218
  },
219
- "required": [
220
- "identity",
221
- "jobRun"
222
- ],
223
- "$anchor": "JobStep"
224
- },
225
- "BranchStep": {
226
- "$schema": "https://json-schema.org/draft/2020-12/schema",
227
- "type": "object",
228
219
  "allOf": [
229
220
  {
230
221
  "$ref": "#/$defs/StepKindFacet"
222
+ },
223
+ {
224
+ "$comment": "This will be overlayed dynamically to specify roleBindings corresponding to the roles of the underlying job.",
225
+ "$ref": "#/$defs/RoleBindingsFacet"
231
226
  }
227
+ ]
228
+ },
229
+ "BranchStep": {
230
+ "$anchor": "BranchStep",
231
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
232
+ "type": "object",
233
+ "required": [
234
+ "identity",
235
+ "cases"
232
236
  ],
233
237
  "properties": {
238
+ "identity": {
239
+ "$ref": "#/$defs/BranchStepIdentity"
240
+ },
241
+ "stepKind": {
242
+ "const": "branch"
243
+ },
234
244
  "cases": {
235
245
  "type": "array",
236
246
  "items": {
@@ -238,92 +248,87 @@
238
248
  },
239
249
  "minItems": 1,
240
250
  "uniqueItems": true
241
- },
242
- "identity": {
243
- "$ref": "#/$defs/BranchStepIdentity"
244
- },
245
- "stepKind": {
246
- "const": "branch"
247
251
  }
248
252
  },
249
- "required": [
250
- "identity",
251
- "cases"
252
- ],
253
- "$anchor": "BranchStep"
254
- },
255
- "WhileStep": {
256
- "$schema": "https://json-schema.org/draft/2020-12/schema",
257
- "type": "object",
258
253
  "allOf": [
259
254
  {
260
255
  "$ref": "#/$defs/StepKindFacet"
261
256
  }
257
+ ]
258
+ },
259
+ "WhileStep": {
260
+ "$anchor": "WhileStep",
261
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
262
+ "type": "object",
263
+ "required": [
264
+ "identity",
265
+ "case"
262
266
  ],
263
267
  "properties": {
264
- "case": {
265
- "$ref": "#/$defs/Conditional"
266
- },
267
268
  "identity": {
268
269
  "$ref": "#/$defs/WhileStepIdentity"
269
270
  },
270
271
  "stepKind": {
271
272
  "const": "while"
273
+ },
274
+ "case": {
275
+ "$ref": "#/$defs/Conditional"
272
276
  }
273
277
  },
274
- "required": [
275
- "identity",
276
- "case"
277
- ],
278
- "$anchor": "WhileStep"
279
- },
280
- "ForStep": {
281
- "$schema": "https://json-schema.org/draft/2020-12/schema",
282
- "type": "object",
283
278
  "allOf": [
284
279
  {
285
280
  "$ref": "#/$defs/StepKindFacet"
286
281
  }
282
+ ]
283
+ },
284
+ "ForStep": {
285
+ "$anchor": "ForStep",
286
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
287
+ "type": "object",
288
+ "required": [
289
+ "identity",
290
+ "case"
287
291
  ],
288
292
  "properties": {
289
- "case": {
290
- "$ref": "#/$defs/Conditional"
291
- },
292
293
  "identity": {
293
294
  "$ref": "#/$defs/ForStepIdentity"
294
295
  },
295
296
  "stepKind": {
296
297
  "const": "for"
298
+ },
299
+ "case": {
300
+ "$ref": "#/$defs/Conditional"
297
301
  }
298
302
  },
299
- "required": [
300
- "identity",
301
- "case"
302
- ],
303
- "$anchor": "ForStep"
303
+ "allOf": [
304
+ {
305
+ "$ref": "#/$defs/StepKindFacet"
306
+ }
307
+ ]
304
308
  },
305
309
  "ResourceMissing": {
310
+ "$anchor": "ResourceMissing",
306
311
  "$schema": "https://json-schema.org/draft/2020-12/schema",
307
312
  "type": "object",
308
- "unevaluatedProperties": false,
309
- "$anchor": "ResourceMissing",
310
- "$ref": "#/$defs/ShellMissing"
313
+ "$ref": "#/$defs/ShellMissing",
314
+ "unevaluatedProperties": false
311
315
  },
312
316
  "ResourceInputPotential": {
317
+ "$anchor": "ResourceInputPotential",
313
318
  "$schema": "https://json-schema.org/draft/2020-12/schema",
314
319
  "type": "object",
315
- "unevaluatedProperties": false,
316
- "$anchor": "ResourceInputPotential",
317
- "$ref": "#/$defs/ShellInputPotential"
320
+ "$ref": "#/$defs/ShellInputPotential",
321
+ "unevaluatedProperties": false
318
322
  },
319
323
  "ResourceOutputPotential": {
324
+ "$anchor": "ResourceOutputPotential",
320
325
  "$schema": "https://json-schema.org/draft/2020-12/schema",
321
326
  "type": "object",
322
- "unevaluatedProperties": false,
323
- "$anchor": "ResourceOutputPotential",
324
- "$ref": "#/$defs/ShellOutputPotential"
327
+ "$ref": "#/$defs/ShellOutputPotential",
328
+ "unevaluatedProperties": false
325
329
  },
326
330
  "ResourceMaterialized": {
331
+ "$anchor": "ResourceMaterialized",
327
332
  "$schema": "https://json-schema.org/draft/2020-12/schema",
328
333
  "type": "object",
329
334
  "allOf": [
@@ -335,90 +340,85 @@
335
340
  "$ref": "#/$defs/NucleusFacet"
336
341
  }
337
342
  ],
338
- "unevaluatedProperties": false,
339
- "$anchor": "ResourceMaterialized"
343
+ "unevaluatedProperties": false
344
+ },
345
+ "JobIdentity": {
346
+ "$anchor": "JobIdentity",
347
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
348
+ "type": "string",
349
+ "pattern": "^JOB-.+$"
340
350
  },
341
351
  "StepKindFacet": {
352
+ "$anchor": "StepKindFacet",
342
353
  "$schema": "https://json-schema.org/draft/2020-12/schema",
343
354
  "type": "object",
355
+ "required": [
356
+ "stepKind"
357
+ ],
344
358
  "properties": {
345
359
  "stepKind": {
346
360
  "$ref": "#/$defs/StepKind"
347
361
  }
348
- },
349
- "required": [
350
- "stepKind"
351
- ],
352
- "$anchor": "StepKindFacet"
353
- },
354
- "JobStepIdentity": {
355
- "$schema": "https://json-schema.org/draft/2020-12/schema",
356
- "type": "string",
357
- "$anchor": "JobStepIdentity",
358
- "pattern": "^JobStep-.+$"
362
+ }
359
363
  },
360
- "JobRun": {
364
+ "RoleBindingsFacet": {
365
+ "$anchor": "RoleBindingsFacet",
361
366
  "$schema": "https://json-schema.org/draft/2020-12/schema",
362
367
  "type": "object",
363
- "allOf": [
364
- {
365
- "$comment": "This will be overlayed dynamically to specify roleBindings corresponding to the roles of the underlying job.",
366
- "$ref": "#/$defs/RoleBindingsFacet"
367
- }
368
+ "required": [
369
+ "roleBindings"
368
370
  ],
369
371
  "properties": {
370
- "identity": {
371
- "$ref": "#/$defs/JobRunIdentity"
372
- },
373
- "jobHandle": {
374
- "$ref": "#/$defs/JobIdentity"
372
+ "roleBindings": {
373
+ "$ref": "#/$defs/RoleBindings"
375
374
  }
376
- },
377
- "required": [
378
- "identity",
379
- "jobHandle"
380
- ],
381
- "$anchor": "JobRun"
375
+ }
376
+ },
377
+ "BranchStepIdentity": {
378
+ "$anchor": "BranchStepIdentity",
379
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
380
+ "type": "string",
381
+ "pattern": "^BRANCH_STEP-.+$"
382
382
  },
383
383
  "Conditional": {
384
+ "$anchor": "Conditional",
384
385
  "$schema": "https://json-schema.org/draft/2020-12/schema",
385
386
  "type": "object",
387
+ "required": [
388
+ "when",
389
+ "what"
390
+ ],
386
391
  "properties": {
387
- "what": {
392
+ "when": {
388
393
  "$ref": "#/$defs/JobStep"
389
394
  },
390
- "when": {
395
+ "what": {
391
396
  "$ref": "#/$defs/JobStep"
392
397
  }
393
398
  },
394
- "required": [
395
- "when",
396
- "what"
397
- ],
398
- "unevaluatedProperties": false,
399
- "$anchor": "Conditional"
400
- },
401
- "BranchStepIdentity": {
402
- "$schema": "https://json-schema.org/draft/2020-12/schema",
403
- "type": "string",
404
- "$anchor": "BranchStepIdentity",
405
- "pattern": "^BRANCHSTEP-.+$"
399
+ "unevaluatedProperties": false
406
400
  },
407
401
  "WhileStepIdentity": {
402
+ "$anchor": "WhileStepIdentity",
408
403
  "$schema": "https://json-schema.org/draft/2020-12/schema",
409
404
  "type": "string",
410
- "$anchor": "WhileStepIdentity",
411
- "pattern": "^WHILESTEP-.+$"
405
+ "pattern": "^WHILE_STEP-.+$"
412
406
  },
413
407
  "ForStepIdentity": {
408
+ "$anchor": "ForStepIdentity",
414
409
  "$schema": "https://json-schema.org/draft/2020-12/schema",
415
410
  "type": "string",
416
- "$anchor": "ForStepIdentity",
417
- "pattern": "^FORSTEP-.+$"
411
+ "pattern": "^FOR_STEP-.+$"
418
412
  },
419
413
  "ShellMissing": {
414
+ "$anchor": "ShellMissing",
420
415
  "$schema": "https://json-schema.org/draft/2020-12/schema",
421
416
  "type": "object",
417
+ "properties": {
418
+ "resourceKind": {
419
+ "const": "missing"
420
+ }
421
+ },
422
422
  "allOf": [
423
423
  {
424
424
  "$ref": "#/$defs/ResourceBase"
@@ -427,17 +427,17 @@
427
427
  "$ref": "#/$defs/ResourceKindFacet"
428
428
  }
429
429
  ],
430
- "properties": {
431
- "resourceKind": {
432
- "const": "missing"
433
- }
434
- },
435
- "unevaluatedProperties": false,
436
- "$anchor": "ShellMissing"
430
+ "unevaluatedProperties": false
437
431
  },
438
432
  "ShellInputPotential": {
433
+ "$anchor": "ShellInputPotential",
439
434
  "$schema": "https://json-schema.org/draft/2020-12/schema",
440
435
  "type": "object",
436
+ "properties": {
437
+ "resourceKind": {
438
+ "const": "input-potential"
439
+ }
440
+ },
441
441
  "allOf": [
442
442
  {
443
443
  "$ref": "#/$defs/ResourceBase"
@@ -449,17 +449,17 @@
449
449
  "$ref": "#/$defs/ResourceKindFacet"
450
450
  }
451
451
  ],
452
- "properties": {
453
- "resourceKind": {
454
- "const": "input-potential"
455
- }
456
- },
457
- "unevaluatedProperties": false,
458
- "$anchor": "ShellInputPotential"
452
+ "unevaluatedProperties": false
459
453
  },
460
454
  "ShellOutputPotential": {
455
+ "$anchor": "ShellOutputPotential",
461
456
  "$schema": "https://json-schema.org/draft/2020-12/schema",
462
457
  "type": "object",
458
+ "properties": {
459
+ "resourceKind": {
460
+ "const": "output-potential"
461
+ }
462
+ },
463
463
  "allOf": [
464
464
  {
465
465
  "$ref": "#/$defs/ResourceBase"
@@ -471,17 +471,23 @@
471
471
  "$ref": "#/$defs/ResourceKindFacet"
472
472
  }
473
473
  ],
474
- "properties": {
475
- "resourceKind": {
476
- "const": "output-potential"
477
- }
478
- },
479
- "unevaluatedProperties": false,
480
- "$anchor": "ShellOutputPotential"
474
+ "unevaluatedProperties": false
481
475
  },
482
476
  "ShellMaterializedBase": {
477
+ "$anchor": "ShellMaterializedBase",
483
478
  "$schema": "https://json-schema.org/draft/2020-12/schema",
484
479
  "type": "object",
480
+ "required": [
481
+ "version"
482
+ ],
483
+ "properties": {
484
+ "version": {
485
+ "const": 1
486
+ },
487
+ "resourceKind": {
488
+ "const": "materialized"
489
+ }
490
+ },
485
491
  "allOf": [
486
492
  {
487
493
  "$ref": "#/$defs/ResourceBase"
@@ -498,37 +504,25 @@
498
504
  {
499
505
  "$ref": "#/$defs/PathFacet"
500
506
  }
501
- ],
502
- "properties": {
503
- "resourceKind": {
504
- "const": "materialized"
505
- },
506
- "version": {
507
- "const": 1
508
- }
509
- },
510
- "required": [
511
- "version"
512
- ],
513
- "$anchor": "ShellMaterializedBase"
507
+ ]
514
508
  },
515
509
  "NucleusFacet": {
510
+ "$anchor": "NucleusFacet",
516
511
  "$schema": "https://json-schema.org/draft/2020-12/schema",
517
512
  "type": "object",
513
+ "required": [
514
+ "nucleus"
515
+ ],
518
516
  "properties": {
519
517
  "nucleus": {
520
518
  "$ref": "#/$defs/Nucleus"
521
519
  }
522
- },
523
- "required": [
524
- "nucleus"
525
- ],
526
- "$anchor": "NucleusFacet"
520
+ }
527
521
  },
528
522
  "StepKind": {
523
+ "$anchor": "StepKind",
529
524
  "$schema": "https://json-schema.org/draft/2020-12/schema",
530
525
  "type": "string",
531
- "$anchor": "StepKind",
532
526
  "enum": [
533
527
  "job",
534
528
  "branch",
@@ -536,28 +530,31 @@
536
530
  "for"
537
531
  ]
538
532
  },
539
- "RoleBindingsFacet": {
533
+ "RoleBindings": {
534
+ "$anchor": "RoleBindings",
540
535
  "$schema": "https://json-schema.org/draft/2020-12/schema",
541
536
  "type": "object",
542
- "properties": {
543
- "roleBindings": {
544
- "$ref": "#/$defs/RoleBindings"
545
- }
546
- },
547
537
  "required": [
548
- "roleBindings"
538
+ "inputBindings",
539
+ "outputBindings"
549
540
  ],
550
- "$anchor": "RoleBindingsFacet"
551
- },
552
- "JobIdentity": {
553
- "$schema": "https://json-schema.org/draft/2020-12/schema",
554
- "type": "string",
555
- "$anchor": "JobIdentity",
556
- "pattern": "^JOB-.+$"
541
+ "properties": {
542
+ "inputBindings": {
543
+ "$ref": "#/$defs/RoleBindingArray"
544
+ },
545
+ "outputBindings": {
546
+ "$ref": "#/$defs/RoleBindingArray"
547
+ }
548
+ }
557
549
  },
558
550
  "ResourceBase": {
551
+ "$anchor": "ResourceBase",
559
552
  "$schema": "https://json-schema.org/draft/2020-12/schema",
560
553
  "type": "object",
554
+ "required": [
555
+ "identity",
556
+ "resourceTypeHandle"
557
+ ],
561
558
  "properties": {
562
559
  "identity": {
563
560
  "$ref": "#/$defs/ResourceIdentity"
@@ -565,106 +562,92 @@
565
562
  "resourceTypeHandle": {
566
563
  "$ref": "#/$defs/ResourceTypeIdentity"
567
564
  }
568
- },
569
- "required": [
570
- "identity",
571
- "resourceTypeHandle"
572
- ],
573
- "$anchor": "ResourceBase"
565
+ }
574
566
  },
575
567
  "ResourceKindFacet": {
568
+ "$anchor": "ResourceKindFacet",
576
569
  "$schema": "https://json-schema.org/draft/2020-12/schema",
577
570
  "type": "object",
571
+ "required": [
572
+ "resourceKind"
573
+ ],
578
574
  "properties": {
579
575
  "resourceKind": {
580
576
  "$ref": "#/$defs/ResourceKind"
581
577
  }
582
- },
583
- "required": [
584
- "resourceKind"
585
- ],
586
- "$anchor": "ResourceKindFacet"
578
+ }
587
579
  },
588
580
  "CreationContextFacet": {
581
+ "$anchor": "CreationContextFacet",
589
582
  "$schema": "https://json-schema.org/draft/2020-12/schema",
590
583
  "type": "object",
584
+ "required": [
585
+ "creationContext"
586
+ ],
591
587
  "properties": {
592
588
  "creationContext": {
593
589
  "$ref": "#/$defs/CreationContext"
594
590
  }
595
- },
596
- "required": [
597
- "creationContext"
598
- ],
599
- "$anchor": "CreationContextFacet"
591
+ }
600
592
  },
601
593
  "TimestampFacet": {
594
+ "$anchor": "TimestampFacet",
602
595
  "$schema": "https://json-schema.org/draft/2020-12/schema",
603
596
  "type": "object",
597
+ "required": [
598
+ "timestamp"
599
+ ],
604
600
  "properties": {
605
601
  "timestamp": {
606
602
  "$ref": "#/$defs/Timestamp"
607
603
  }
608
- },
609
- "required": [
610
- "timestamp"
611
- ],
612
- "$anchor": "TimestampFacet"
604
+ }
613
605
  },
614
606
  "PathFacet": {
607
+ "$anchor": "PathFacet",
615
608
  "$schema": "https://json-schema.org/draft/2020-12/schema",
616
609
  "type": "object",
610
+ "required": [
611
+ "path"
612
+ ],
617
613
  "properties": {
618
614
  "path": {
619
615
  "$ref": "#/$defs/Path"
620
616
  }
621
- },
622
- "required": [
623
- "path"
624
- ],
625
- "$anchor": "PathFacet"
617
+ }
626
618
  },
627
619
  "Nucleus": {
620
+ "$anchor": "Nucleus",
628
621
  "$schema": "https://json-schema.org/draft/2020-12/schema",
629
622
  "type": "object",
630
623
  "additionalProperties": {
631
624
  "$ref": "#/$defs/JsonData"
632
- },
633
- "$anchor": "Nucleus"
625
+ }
634
626
  },
635
- "RoleBindings": {
627
+ "RoleBindingArray": {
628
+ "$anchor": "RoleBindingArray",
636
629
  "$schema": "https://json-schema.org/draft/2020-12/schema",
637
- "type": "object",
638
- "properties": {
639
- "inputBindings": {
640
- "$ref": "#/$defs/RoleBindingArray"
641
- },
642
- "outputBindings": {
643
- "$ref": "#/$defs/RoleBindingArray"
644
- }
645
- },
646
- "required": [
647
- "inputBindings",
648
- "outputBindings"
649
- ],
650
- "$anchor": "RoleBindings"
630
+ "type": "array",
631
+ "items": {
632
+ "$ref": "#/$defs/ResourceRoleIdentity"
633
+ }
651
634
  },
652
635
  "ResourceIdentity": {
636
+ "$anchor": "ResourceIdentity",
653
637
  "$schema": "https://json-schema.org/draft/2020-12/schema",
654
638
  "type": "string",
655
- "$anchor": "ResourceIdentity",
656
639
  "pattern": "^RESOURCE-.+$"
657
640
  },
658
641
  "ResourceTypeIdentity": {
642
+ "$anchor": "ResourceTypeIdentity",
659
643
  "$schema": "https://json-schema.org/draft/2020-12/schema",
660
644
  "type": "string",
661
- "$anchor": "ResourceTypeIdentity",
662
645
  "pattern": "^TYPE-.+$"
663
646
  },
664
647
  "ResourceKind": {
648
+ "$anchor": "ResourceKind",
665
649
  "$schema": "https://json-schema.org/draft/2020-12/schema",
666
650
  "type": "string",
667
- "$anchor": "ResourceKind",
668
651
  "enum": [
669
652
  "missing",
670
653
  "input-potential",
@@ -673,29 +656,30 @@
673
656
  ]
674
657
  },
675
658
  "CreationContext": {
659
+ "$anchor": "CreationContext",
676
660
  "$schema": "https://json-schema.org/draft/2020-12/schema",
677
661
  "type": "object",
662
+ "required": [
663
+ "resourceRoleHandle",
664
+ "jobStepHandle"
665
+ ],
678
666
  "properties": {
679
- "jobRunHandle": {
680
- "$ref": "#/$defs/JobRunIdentity"
681
- },
682
667
  "resourceRoleHandle": {
683
668
  "$ref": "#/$defs/ResourceRoleIdentity"
669
+ },
670
+ "jobStepHandle": {
671
+ "$ref": "#/$defs/JobStepIdentity"
684
672
  }
685
- },
686
- "required": [
687
- "resourceRoleHandle",
688
- "jobRunHandle"
689
- ],
690
- "$anchor": "CreationContext"
673
+ }
691
674
  },
692
675
  "Path": {
676
+ "$anchor": "Path",
693
677
  "$schema": "https://json-schema.org/draft/2020-12/schema",
694
678
  "type": "string",
695
- "$anchor": "Path",
696
679
  "format": "uri-reference"
697
680
  },
698
681
  "JsonData": {
682
+ "$anchor": "JsonData",
699
683
  "$schema": "https://json-schema.org/draft/2020-12/schema",
700
684
  "oneOf": [
701
685
  {
@@ -722,16 +706,7 @@
722
706
  "$ref": "#/$defs/JsonData"
723
707
  }
724
708
  }
725
- ],
726
- "$anchor": "JsonData"
727
- },
728
- "RoleBindingArray": {
729
- "$schema": "https://json-schema.org/draft/2020-12/schema",
730
- "type": "array",
731
- "$anchor": "RoleBindingArray",
732
- "items": {
733
- "$ref": "#/$defs/ResourceRoleIdentity"
734
- }
709
+ ]
735
710
  }
736
711
  }
737
712
  }