@toolproof-npm/schema 0.1.33 → 0.1.35
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.
- package/dist/_lib/test.js +16 -16
- package/dist/_lib/types/Resource_Job.d.ts +55 -0
- package/dist/_lib/types/Resource_ResourceFormat.d.ts +40 -0
- package/dist/_lib/types/Resource_ResourceFormat.js +1 -0
- package/dist/_lib/types/Resource_ResourceType.d.ts +60 -0
- package/dist/_lib/types/Resource_ResourceType.js +1 -0
- package/dist/_lib/types/Resource_StatelessStrategy.d.ts +79 -0
- package/dist/_lib/types/Resource_StatelessStrategy.js +1 -0
- package/dist/_lib/types/types.d.ts +493 -355
- package/dist/genesis/generated/resources/Genesis.d.ts +2 -0
- package/dist/genesis/generated/resources/Genesis.js +2 -0
- package/dist/genesis/generated/resources/Genesis.json +2113 -0
- package/dist/{schemas → genesis/generated/schemas}/Genesis.json +269 -348
- package/dist/{schemas → genesis/generated/schemas}/Job.json +24 -26
- package/dist/genesis/generated/schemas/ResourceFormat.d.ts +2 -0
- package/dist/genesis/generated/schemas/ResourceFormat.js +2 -0
- package/dist/genesis/generated/schemas/ResourceFormat.json +74 -0
- package/dist/genesis/generated/schemas/ResourceType.d.ts +2 -0
- package/dist/genesis/generated/schemas/ResourceType.js +2 -0
- package/dist/genesis/generated/schemas/ResourceType.json +361 -0
- package/dist/genesis/generated/schemas/StatefulStrategy.d.ts +2 -0
- package/dist/genesis/generated/schemas/StatefulStrategy.js +2 -0
- package/dist/genesis/generated/schemas/StatefulStrategy.json +647 -0
- package/dist/genesis/generated/schemas/StatelessStrategy.d.ts +2 -0
- package/dist/genesis/generated/schemas/StatelessStrategy.js +2 -0
- package/dist/genesis/generated/schemas/StatelessStrategy.json +324 -0
- package/dist/genesis/resourceTypes/Genesis.d.ts +2 -0
- package/dist/genesis/resourceTypes/Genesis.js +2 -0
- package/dist/genesis/resourceTypes/Genesis.json +1523 -0
- package/dist/index.d.ts +8 -5
- package/dist/index.js +4 -3
- package/dist/scripts/_lib/config.d.ts +45 -0
- package/dist/scripts/_lib/config.js +109 -0
- package/dist/scripts/brandFactories.d.ts +5 -5
- package/dist/scripts/brandFactories.js +4 -5
- package/dist/scripts/extractSchemas.js +33 -8
- package/dist/scripts/extractSubschemaWithDefs.js +36 -7
- package/dist/scripts/generateResourceEnvelopes.js +77 -0
- package/dist/scripts/generateResourceTypeType.d.ts +1 -0
- package/dist/scripts/{generateResourceData.js → generateResourceTypeType.js} +21 -19
- package/dist/scripts/generateSchemaShims.d.ts +1 -0
- package/dist/scripts/generateSchemaShims.js +63 -0
- package/dist/scripts/generateTypes.js +116 -83
- package/dist/scripts/rewriteAnchors.d.ts +1 -0
- package/dist/scripts/rewriteAnchors.js +90 -0
- package/package.json +50 -52
- package/dist/_lib/types/ResourceData_Job.d.ts +0 -97
- /package/dist/_lib/types/{ResourceData_Job.js → Resource_Job.js} +0 -0
- /package/dist/{schemas → genesis/generated/schemas}/Genesis.d.ts +0 -0
- /package/dist/{schemas → genesis/generated/schemas}/Genesis.js +0 -0
- /package/dist/{schemas → genesis/generated/schemas}/Job.d.ts +0 -0
- /package/dist/{schemas → genesis/generated/schemas}/Job.js +0 -0
- /package/dist/scripts/{generateResourceData.d.ts → generateResourceEnvelopes.d.ts} +0 -0
|
@@ -6,9 +6,6 @@
|
|
|
6
6
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"allOf": [
|
|
9
|
-
{
|
|
10
|
-
"$ref": "#/$defs/Identifiable"
|
|
11
|
-
},
|
|
12
9
|
{
|
|
13
10
|
"$ref": "#/$defs/StepKind"
|
|
14
11
|
},
|
|
@@ -23,7 +20,7 @@
|
|
|
23
20
|
"minItems": 1,
|
|
24
21
|
"uniqueItems": true
|
|
25
22
|
},
|
|
26
|
-
"
|
|
23
|
+
"identity": {
|
|
27
24
|
"$ref": "#/$defs/BranchStepId"
|
|
28
25
|
},
|
|
29
26
|
"kind": {
|
|
@@ -31,7 +28,7 @@
|
|
|
31
28
|
}
|
|
32
29
|
},
|
|
33
30
|
"required": [
|
|
34
|
-
"
|
|
31
|
+
"identity",
|
|
35
32
|
"kind",
|
|
36
33
|
"cases"
|
|
37
34
|
]
|
|
@@ -50,7 +47,7 @@
|
|
|
50
47
|
"type": "object",
|
|
51
48
|
"properties": {
|
|
52
49
|
"canonicalRef": {
|
|
53
|
-
"$comment": "This points to the canonical resource with an identical contentHash as this one. If no such resource exists, this resource will itself be the canonical resource and point to itself (i.e. canonicalRef =
|
|
50
|
+
"$comment": "This points to the canonical resource with an identical contentHash as this one. If no such resource exists, this resource will itself be the canonical resource and point to itself (i.e. canonicalRef = identity).",
|
|
54
51
|
"$ref": "#/$defs/ResourceId"
|
|
55
52
|
}
|
|
56
53
|
},
|
|
@@ -123,13 +120,10 @@
|
|
|
123
120
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
124
121
|
"type": "object",
|
|
125
122
|
"allOf": [
|
|
126
|
-
{
|
|
127
|
-
"$ref": "#/$defs/Identifiable"
|
|
128
|
-
},
|
|
129
123
|
{
|
|
130
124
|
"type": "object",
|
|
131
125
|
"properties": {
|
|
132
|
-
"
|
|
126
|
+
"identity": {
|
|
133
127
|
"$ref": "#/$defs/ExecutionId"
|
|
134
128
|
},
|
|
135
129
|
"jobId": {
|
|
@@ -137,7 +131,7 @@
|
|
|
137
131
|
}
|
|
138
132
|
},
|
|
139
133
|
"required": [
|
|
140
|
-
"
|
|
134
|
+
"identity",
|
|
141
135
|
"jobId"
|
|
142
136
|
]
|
|
143
137
|
},
|
|
@@ -172,25 +166,48 @@
|
|
|
172
166
|
"type": "object",
|
|
173
167
|
"allOf": [
|
|
174
168
|
{
|
|
175
|
-
"
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
"
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
169
|
+
"if": {
|
|
170
|
+
"anyOf": [
|
|
171
|
+
{
|
|
172
|
+
"properties": {
|
|
173
|
+
"properties": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"properties": {
|
|
176
|
+
"identity": {}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"properties": {
|
|
183
|
+
"required": {
|
|
184
|
+
"type": "array",
|
|
185
|
+
"contains": {
|
|
186
|
+
"const": "identity"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
"then": {
|
|
194
|
+
"$ref": "#/$defs/IdentityProp"
|
|
195
|
+
}
|
|
191
196
|
},
|
|
192
197
|
{
|
|
193
|
-
"
|
|
198
|
+
"if": {
|
|
199
|
+
"properties": {
|
|
200
|
+
"properties": {
|
|
201
|
+
"type": "object",
|
|
202
|
+
"properties": {
|
|
203
|
+
"merit": {}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"then": {
|
|
209
|
+
"$ref": "#/$defs/MeritProp"
|
|
210
|
+
}
|
|
194
211
|
},
|
|
195
212
|
{
|
|
196
213
|
"oneOf": [
|
|
@@ -208,10 +225,6 @@
|
|
|
208
225
|
}
|
|
209
226
|
],
|
|
210
227
|
"properties": {
|
|
211
|
-
"$id": {
|
|
212
|
-
"type": "string",
|
|
213
|
-
"format": "uri"
|
|
214
|
-
},
|
|
215
228
|
"$schema": {
|
|
216
229
|
"const": "https://json-schema.org/draft/2020-12/schema"
|
|
217
230
|
},
|
|
@@ -244,6 +257,7 @@
|
|
|
244
257
|
},
|
|
245
258
|
"required": [
|
|
246
259
|
"$schema",
|
|
260
|
+
"$anchor",
|
|
247
261
|
"type"
|
|
248
262
|
],
|
|
249
263
|
"unevaluatedProperties": false,
|
|
@@ -253,9 +267,6 @@
|
|
|
253
267
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
254
268
|
"type": "object",
|
|
255
269
|
"allOf": [
|
|
256
|
-
{
|
|
257
|
-
"$ref": "#/$defs/Identifiable"
|
|
258
|
-
},
|
|
259
270
|
{
|
|
260
271
|
"$ref": "#/$defs/StepKind"
|
|
261
272
|
},
|
|
@@ -265,7 +276,7 @@
|
|
|
265
276
|
"case": {
|
|
266
277
|
"$ref": "#/$defs/ConditionalWrapper"
|
|
267
278
|
},
|
|
268
|
-
"
|
|
279
|
+
"identity": {
|
|
269
280
|
"$ref": "#/$defs/ForStepId"
|
|
270
281
|
},
|
|
271
282
|
"kind": {
|
|
@@ -273,7 +284,7 @@
|
|
|
273
284
|
}
|
|
274
285
|
},
|
|
275
286
|
"required": [
|
|
276
|
-
"
|
|
287
|
+
"identity",
|
|
277
288
|
"kind",
|
|
278
289
|
"case"
|
|
279
290
|
]
|
|
@@ -287,50 +298,42 @@
|
|
|
287
298
|
"$anchor": "ForStepId",
|
|
288
299
|
"pattern": "^FORSTEP-.+$"
|
|
289
300
|
},
|
|
290
|
-
"
|
|
301
|
+
"IdSchemaValue": {
|
|
291
302
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
292
303
|
"type": "object",
|
|
293
|
-
"
|
|
294
|
-
{
|
|
295
|
-
"
|
|
304
|
+
"properties": {
|
|
305
|
+
"type": {
|
|
306
|
+
"const": "string"
|
|
296
307
|
},
|
|
297
|
-
{
|
|
298
|
-
"
|
|
299
|
-
|
|
300
|
-
"$ref": "#/$defs/ResourceFormatId"
|
|
301
|
-
}
|
|
302
|
-
},
|
|
303
|
-
"required": [
|
|
304
|
-
"id"
|
|
305
|
-
]
|
|
308
|
+
"pattern": {
|
|
309
|
+
"type": "string",
|
|
310
|
+
"pattern": "^[A-Z][A-Z0-9._-]*-.+$"
|
|
306
311
|
}
|
|
307
|
-
|
|
308
|
-
"$anchor": "FormatBase"
|
|
309
|
-
},
|
|
310
|
-
"Identifiable": {
|
|
311
|
-
"type": "object",
|
|
312
|
+
},
|
|
312
313
|
"required": [
|
|
313
|
-
"
|
|
314
|
+
"type",
|
|
315
|
+
"pattern"
|
|
314
316
|
],
|
|
315
|
-
"$anchor": "
|
|
316
|
-
},
|
|
317
|
-
"IdentifiableDocumented": {
|
|
318
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
319
|
-
"type": "object",
|
|
320
|
-
"allOf": [
|
|
321
|
-
{
|
|
322
|
-
"$ref": "#/$defs/Identifiable"
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
"$ref": "#/$defs/Documented"
|
|
326
|
-
}
|
|
327
|
-
],
|
|
328
|
-
"$anchor": "IdentifiableDocumented"
|
|
317
|
+
"$anchor": "IdSchemaValue"
|
|
329
318
|
},
|
|
330
319
|
"IdentityProp": {
|
|
331
320
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
332
321
|
"type": "object",
|
|
333
322
|
"properties": {
|
|
323
|
+
"$defs": {
|
|
324
|
+
"type": "object",
|
|
325
|
+
"additionalProperties": true,
|
|
326
|
+
"$comment": "Ajv-specific: patternRequired enforces at least one Id-like key in this $defs block when identity is present.",
|
|
327
|
+
"minProperties": 1,
|
|
328
|
+
"patternProperties": {
|
|
329
|
+
"^[A-Za-z][A-Za-z0-9._-]*Id$": {
|
|
330
|
+
"$ref": "#/$defs/IdSchemaValue"
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"patternRequired": [
|
|
334
|
+
"^[A-Za-z][A-Za-z0-9._-]*Id$"
|
|
335
|
+
]
|
|
336
|
+
},
|
|
334
337
|
"properties": {
|
|
335
338
|
"type": "object",
|
|
336
339
|
"properties": {
|
|
@@ -354,6 +357,7 @@
|
|
|
354
357
|
}
|
|
355
358
|
},
|
|
356
359
|
"required": [
|
|
360
|
+
"$defs",
|
|
357
361
|
"required",
|
|
358
362
|
"properties"
|
|
359
363
|
],
|
|
@@ -362,36 +366,17 @@
|
|
|
362
366
|
"IdentityValue": {
|
|
363
367
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
364
368
|
"type": "object",
|
|
365
|
-
"
|
|
366
|
-
{
|
|
367
|
-
"
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
"string",
|
|
371
|
-
"integer",
|
|
372
|
-
"boolean"
|
|
373
|
-
]
|
|
374
|
-
}
|
|
375
|
-
},
|
|
376
|
-
"required": [
|
|
377
|
-
"type"
|
|
378
|
-
]
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
"properties": {
|
|
382
|
-
"enum": {
|
|
383
|
-
"type": "array",
|
|
384
|
-
"items": {
|
|
385
|
-
"type": "string"
|
|
386
|
-
},
|
|
387
|
-
"minItems": 1
|
|
388
|
-
}
|
|
389
|
-
},
|
|
390
|
-
"required": [
|
|
391
|
-
"enum"
|
|
392
|
-
]
|
|
369
|
+
"properties": {
|
|
370
|
+
"$ref": {
|
|
371
|
+
"type": "string",
|
|
372
|
+
"$comment": "Anchors-only: use #<Name>Id for identity refs. Top-level and nested $defs should expose an $anchor matching <Name>Id.",
|
|
373
|
+
"pattern": "^#[A-Za-z][A-Za-z0-9._-]*Id$"
|
|
393
374
|
}
|
|
375
|
+
},
|
|
376
|
+
"required": [
|
|
377
|
+
"$ref"
|
|
394
378
|
],
|
|
379
|
+
"additionalProperties": false,
|
|
395
380
|
"$anchor": "IdentityValue"
|
|
396
381
|
},
|
|
397
382
|
"Job": {
|
|
@@ -399,26 +384,37 @@
|
|
|
399
384
|
"type": "object",
|
|
400
385
|
"allOf": [
|
|
401
386
|
{
|
|
402
|
-
"
|
|
387
|
+
"properties": {
|
|
388
|
+
"identity": {
|
|
389
|
+
"$ref": "#/$defs/JobId"
|
|
390
|
+
},
|
|
391
|
+
"implementation": {
|
|
392
|
+
"type": "string",
|
|
393
|
+
"format": "uri"
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
"required": [
|
|
397
|
+
"identity",
|
|
398
|
+
"implementation"
|
|
399
|
+
]
|
|
403
400
|
},
|
|
404
401
|
{
|
|
405
|
-
"$ref": "#/$defs/
|
|
402
|
+
"$ref": "#/$defs/Documented"
|
|
406
403
|
},
|
|
407
404
|
{
|
|
408
|
-
"$ref": "#/$defs/
|
|
409
|
-
}
|
|
410
|
-
],
|
|
411
|
-
"properties": {
|
|
412
|
-
"identity": {
|
|
413
|
-
"type": "string"
|
|
405
|
+
"$ref": "#/$defs/RolesOuter"
|
|
414
406
|
}
|
|
415
|
-
},
|
|
416
|
-
"required": [
|
|
417
|
-
"identity"
|
|
418
407
|
],
|
|
419
408
|
"unevaluatedProperties": false,
|
|
420
409
|
"$anchor": "Job"
|
|
421
410
|
},
|
|
411
|
+
"JobId": {
|
|
412
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
413
|
+
"type": "string",
|
|
414
|
+
"$anchor": "JobId",
|
|
415
|
+
"$comment": "",
|
|
416
|
+
"pattern": "^JOB-.+$"
|
|
417
|
+
},
|
|
422
418
|
"JsonValue": {
|
|
423
419
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
424
420
|
"oneOf": [
|
|
@@ -533,7 +529,7 @@
|
|
|
533
529
|
"type": "object",
|
|
534
530
|
"properties": {
|
|
535
531
|
"pendingRef": {
|
|
536
|
-
"$comment": "This points to a resource created at a previous step in the same workflow. This resource is not yet
|
|
532
|
+
"$comment": "This points to a resource created at a previous step in the same workflow. This resource is not yet materialized at the time of defining the workflow, but will be materialized when the step using this resource is executed.The Engine resolves this ref at runtime.",
|
|
537
533
|
"$ref": "#/$defs/ResourceSocket"
|
|
538
534
|
}
|
|
539
535
|
},
|
|
@@ -542,30 +538,46 @@
|
|
|
542
538
|
],
|
|
543
539
|
"$anchor": "PendingRef"
|
|
544
540
|
},
|
|
545
|
-
"
|
|
541
|
+
"Resource": {
|
|
546
542
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
547
543
|
"type": "object",
|
|
548
544
|
"allOf": [
|
|
549
545
|
{
|
|
550
|
-
"$ref": "#/$defs/
|
|
546
|
+
"$ref": "#/$defs/ResourceMetaBase"
|
|
551
547
|
},
|
|
552
548
|
{
|
|
553
549
|
"properties": {
|
|
554
|
-
"
|
|
555
|
-
"
|
|
550
|
+
"extractedData": {
|
|
551
|
+
"type": "object",
|
|
552
|
+
"additionalProperties": {
|
|
553
|
+
"$ref": "#/$defs/JsonValue"
|
|
554
|
+
},
|
|
555
|
+
"$comment": "This will be overlayed at runtime to match the data structure of the underlying type's extractionSchema. At compile time, we guarantee it has an identity property."
|
|
556
556
|
}
|
|
557
557
|
},
|
|
558
558
|
"required": [
|
|
559
|
-
"
|
|
559
|
+
"extractedData"
|
|
560
560
|
]
|
|
561
|
-
}
|
|
561
|
+
}
|
|
562
|
+
],
|
|
563
|
+
"unevaluatedProperties": false,
|
|
564
|
+
"$anchor": "Resource"
|
|
565
|
+
},
|
|
566
|
+
"ResourceBase": {
|
|
567
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
568
|
+
"type": "object",
|
|
569
|
+
"allOf": [
|
|
562
570
|
{
|
|
563
571
|
"properties": {
|
|
572
|
+
"identity": {
|
|
573
|
+
"$ref": "#/$defs/ResourceId"
|
|
574
|
+
},
|
|
564
575
|
"resourceTypeId": {
|
|
565
576
|
"$ref": "#/$defs/ResourceTypeId"
|
|
566
577
|
}
|
|
567
578
|
},
|
|
568
579
|
"required": [
|
|
580
|
+
"identity",
|
|
569
581
|
"resourceTypeId"
|
|
570
582
|
]
|
|
571
583
|
},
|
|
@@ -575,53 +587,25 @@
|
|
|
575
587
|
],
|
|
576
588
|
"$anchor": "ResourceBase"
|
|
577
589
|
},
|
|
578
|
-
"
|
|
590
|
+
"ResourceFormat": {
|
|
579
591
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
580
592
|
"type": "object",
|
|
581
593
|
"allOf": [
|
|
582
|
-
{
|
|
583
|
-
"$ref": "#/$defs/ResourceMetaBase"
|
|
584
|
-
},
|
|
585
594
|
{
|
|
586
595
|
"properties": {
|
|
587
|
-
"
|
|
588
|
-
"
|
|
589
|
-
"properties": {
|
|
590
|
-
"identity": {
|
|
591
|
-
"type": [
|
|
592
|
-
"string",
|
|
593
|
-
"integer",
|
|
594
|
-
"boolean"
|
|
595
|
-
]
|
|
596
|
-
}
|
|
597
|
-
},
|
|
598
|
-
"required": [
|
|
599
|
-
"identity"
|
|
600
|
-
],
|
|
601
|
-
"additionalProperties": {
|
|
602
|
-
"$ref": "#/$defs/JsonValue"
|
|
603
|
-
},
|
|
604
|
-
"$comment": "This will be overlayed at runtime to match the data structure of the underlying type's extractionSchema. At compile time, we guarantee it has an identity property."
|
|
596
|
+
"identity": {
|
|
597
|
+
"$ref": "#/$defs/ResourceFormatId"
|
|
605
598
|
}
|
|
606
599
|
},
|
|
607
600
|
"required": [
|
|
608
|
-
"
|
|
601
|
+
"identity"
|
|
609
602
|
]
|
|
610
|
-
}
|
|
611
|
-
],
|
|
612
|
-
"unevaluatedProperties": false,
|
|
613
|
-
"$anchor": "ResourceData"
|
|
614
|
-
},
|
|
615
|
-
"ResourceFormatData": {
|
|
616
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
617
|
-
"type": "object",
|
|
618
|
-
"allOf": [
|
|
603
|
+
},
|
|
619
604
|
{
|
|
620
|
-
"$ref": "#/$defs/
|
|
605
|
+
"$ref": "#/$defs/Documented"
|
|
621
606
|
}
|
|
622
607
|
],
|
|
623
|
-
"
|
|
624
|
-
"$anchor": "ResourceFormatData"
|
|
608
|
+
"$anchor": "ResourceFormat"
|
|
625
609
|
},
|
|
626
610
|
"ResourceFormatId": {
|
|
627
611
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -629,20 +613,6 @@
|
|
|
629
613
|
"$anchor": "ResourceFormatId",
|
|
630
614
|
"pattern": "^FORMAT-.+$"
|
|
631
615
|
},
|
|
632
|
-
"ResourceFormatMeta": {
|
|
633
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
634
|
-
"type": "object",
|
|
635
|
-
"allOf": [
|
|
636
|
-
{
|
|
637
|
-
"$ref": "#/$defs/FormatBase"
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
"$ref": "#/$defs/Path"
|
|
641
|
-
}
|
|
642
|
-
],
|
|
643
|
-
"unevaluatedProperties": false,
|
|
644
|
-
"$anchor": "ResourceFormatMeta"
|
|
645
|
-
},
|
|
646
616
|
"ResourceId": {
|
|
647
617
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
648
618
|
"type": "string",
|
|
@@ -658,7 +628,7 @@
|
|
|
658
628
|
"enum": [
|
|
659
629
|
"potential-input",
|
|
660
630
|
"potential-output",
|
|
661
|
-
"
|
|
631
|
+
"materialized"
|
|
662
632
|
]
|
|
663
633
|
}
|
|
664
634
|
},
|
|
@@ -667,33 +637,6 @@
|
|
|
667
637
|
],
|
|
668
638
|
"$anchor": "ResourceKind"
|
|
669
639
|
},
|
|
670
|
-
"ResourceMap": {
|
|
671
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
672
|
-
"type": "object",
|
|
673
|
-
"additionalProperties": {
|
|
674
|
-
"type": "object",
|
|
675
|
-
"additionalProperties": {
|
|
676
|
-
"oneOf": [
|
|
677
|
-
{
|
|
678
|
-
"$ref": "#/$defs/ResourcePotentialInput"
|
|
679
|
-
},
|
|
680
|
-
{
|
|
681
|
-
"$ref": "#/$defs/ResourcePotentialOutput"
|
|
682
|
-
},
|
|
683
|
-
{
|
|
684
|
-
"$ref": "#/$defs/ResourceData"
|
|
685
|
-
}
|
|
686
|
-
]
|
|
687
|
-
},
|
|
688
|
-
"propertyNames": {
|
|
689
|
-
"$ref": "#/$defs/ResourceRoleId"
|
|
690
|
-
}
|
|
691
|
-
},
|
|
692
|
-
"$anchor": "ResourceMap",
|
|
693
|
-
"propertyNames": {
|
|
694
|
-
"$ref": "#/$defs/ExecutionId"
|
|
695
|
-
}
|
|
696
|
-
},
|
|
697
640
|
"ResourceMeta": {
|
|
698
641
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
699
642
|
"type": "object",
|
|
@@ -714,7 +657,7 @@
|
|
|
714
657
|
{
|
|
715
658
|
"properties": {
|
|
716
659
|
"kind": {
|
|
717
|
-
"const": "
|
|
660
|
+
"const": "materialized"
|
|
718
661
|
}
|
|
719
662
|
},
|
|
720
663
|
"required": [
|
|
@@ -722,10 +665,10 @@
|
|
|
722
665
|
]
|
|
723
666
|
},
|
|
724
667
|
{
|
|
725
|
-
"$ref": "#/$defs/
|
|
668
|
+
"$ref": "#/$defs/Timestamp"
|
|
726
669
|
},
|
|
727
670
|
{
|
|
728
|
-
"$ref": "#/$defs/
|
|
671
|
+
"$ref": "#/$defs/Path"
|
|
729
672
|
}
|
|
730
673
|
],
|
|
731
674
|
"$anchor": "ResourceMetaBase"
|
|
@@ -816,7 +759,8 @@
|
|
|
816
759
|
},
|
|
817
760
|
"required": [
|
|
818
761
|
"resourceTypeId"
|
|
819
|
-
]
|
|
762
|
+
],
|
|
763
|
+
"$comment": "A ResourceRole does not have a self-contained identity, as it is always defined in the context of a RoleMap."
|
|
820
764
|
},
|
|
821
765
|
{
|
|
822
766
|
"$ref": "#/$defs/Documented"
|
|
@@ -841,16 +785,13 @@
|
|
|
841
785
|
],
|
|
842
786
|
"$anchor": "ResourceSocket"
|
|
843
787
|
},
|
|
844
|
-
"
|
|
788
|
+
"ResourceType": {
|
|
845
789
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
846
790
|
"type": "object",
|
|
847
791
|
"allOf": [
|
|
848
|
-
{
|
|
849
|
-
"$ref": "#/$defs/IdentifiableDocumented"
|
|
850
|
-
},
|
|
851
792
|
{
|
|
852
793
|
"properties": {
|
|
853
|
-
"
|
|
794
|
+
"identity": {
|
|
854
795
|
"$ref": "#/$defs/ResourceTypeId"
|
|
855
796
|
},
|
|
856
797
|
"resourceFormatId": {
|
|
@@ -858,41 +799,15 @@
|
|
|
858
799
|
}
|
|
859
800
|
},
|
|
860
801
|
"required": [
|
|
861
|
-
"
|
|
802
|
+
"identity",
|
|
862
803
|
"resourceFormatId"
|
|
863
804
|
]
|
|
864
|
-
}
|
|
865
|
-
],
|
|
866
|
-
"$anchor": "ResourceTypeBase"
|
|
867
|
-
},
|
|
868
|
-
"ResourceTypeData": {
|
|
869
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
870
|
-
"type": "object",
|
|
871
|
-
"allOf": [
|
|
872
|
-
{
|
|
873
|
-
"$ref": "#/$defs/ResourceTypeBase"
|
|
874
805
|
},
|
|
875
806
|
{
|
|
876
|
-
"$ref": "#/$defs/
|
|
877
|
-
}
|
|
878
|
-
],
|
|
879
|
-
"$anchor": "ResourceTypeData"
|
|
880
|
-
},
|
|
881
|
-
"ResourceTypeId": {
|
|
882
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
883
|
-
"type": "string",
|
|
884
|
-
"$anchor": "ResourceTypeId",
|
|
885
|
-
"pattern": "^TYPE-.+$"
|
|
886
|
-
},
|
|
887
|
-
"ResourceTypeMeta": {
|
|
888
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
889
|
-
"type": "object",
|
|
890
|
-
"allOf": [
|
|
891
|
-
{
|
|
892
|
-
"$ref": "#/$defs/ResourceTypeBase"
|
|
807
|
+
"$ref": "#/$defs/Documented"
|
|
893
808
|
},
|
|
894
809
|
{
|
|
895
|
-
"$ref": "#/$defs/
|
|
810
|
+
"$ref": "#/$defs/ExtractionSchema"
|
|
896
811
|
},
|
|
897
812
|
{
|
|
898
813
|
"if": {
|
|
@@ -901,20 +816,36 @@
|
|
|
901
816
|
"const": "FORMAT-ApplicationJson"
|
|
902
817
|
}
|
|
903
818
|
},
|
|
904
|
-
"$comment": "If resourceFormatId is FORMAT-ApplicationJson, then
|
|
819
|
+
"$comment": "If resourceFormatId is FORMAT-ApplicationJson, then extractor must not be present, but if resourceFormatId is not FORMAT-ApplicationJson, then extractor must be present. This is because resources of types with format FORMAT-ApplicationJson are self-contained and do not need an extractor."
|
|
905
820
|
},
|
|
906
821
|
"then": {
|
|
907
822
|
"not": {
|
|
908
|
-
"
|
|
823
|
+
"required": [
|
|
824
|
+
"extractor"
|
|
825
|
+
]
|
|
909
826
|
}
|
|
910
827
|
},
|
|
911
828
|
"else": {
|
|
912
|
-
"
|
|
829
|
+
"type": "object",
|
|
830
|
+
"properties": {
|
|
831
|
+
"extractor": {
|
|
832
|
+
"type": "string",
|
|
833
|
+
"format": "uri"
|
|
834
|
+
}
|
|
835
|
+
},
|
|
836
|
+
"required": [
|
|
837
|
+
"extractor"
|
|
838
|
+
]
|
|
913
839
|
}
|
|
914
840
|
}
|
|
915
841
|
],
|
|
916
|
-
"
|
|
917
|
-
|
|
842
|
+
"$anchor": "ResourceType"
|
|
843
|
+
},
|
|
844
|
+
"ResourceTypeId": {
|
|
845
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
846
|
+
"type": "string",
|
|
847
|
+
"$anchor": "ResourceTypeId",
|
|
848
|
+
"pattern": "^TYPE-.+$"
|
|
918
849
|
},
|
|
919
850
|
"RoleBindingMap": {
|
|
920
851
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -1000,44 +931,88 @@
|
|
|
1000
931
|
],
|
|
1001
932
|
"$anchor": "RolesOuter"
|
|
1002
933
|
},
|
|
1003
|
-
"
|
|
934
|
+
"StatefulStrategy": {
|
|
1004
935
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1005
936
|
"type": "object",
|
|
1006
|
-
"
|
|
1007
|
-
{
|
|
1008
|
-
"$ref": "#/$defs/WorkStep"
|
|
1009
|
-
},
|
|
937
|
+
"allOf": [
|
|
1010
938
|
{
|
|
1011
|
-
"
|
|
939
|
+
"properties": {
|
|
940
|
+
"identity": {
|
|
941
|
+
"$ref": "#/$defs/StatefulStrategyId"
|
|
942
|
+
},
|
|
943
|
+
"statelessStrategy": {
|
|
944
|
+
"$ref": "#/$defs/StatelessStrategy"
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
"required": [
|
|
948
|
+
"identity",
|
|
949
|
+
"statelessStrategy"
|
|
950
|
+
]
|
|
1012
951
|
},
|
|
1013
952
|
{
|
|
1014
|
-
"$ref": "#/$defs/
|
|
1015
|
-
}
|
|
953
|
+
"$ref": "#/$defs/StrategyState"
|
|
954
|
+
}
|
|
955
|
+
],
|
|
956
|
+
"$anchor": "StatefulStrategy"
|
|
957
|
+
},
|
|
958
|
+
"StatefulStrategyId": {
|
|
959
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
960
|
+
"type": "string",
|
|
961
|
+
"$anchor": "StatefulStrategyId",
|
|
962
|
+
"pattern": "^STATEFULSTRATEGY-.+$"
|
|
963
|
+
},
|
|
964
|
+
"StatelessStrategy": {
|
|
965
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
966
|
+
"type": "object",
|
|
967
|
+
"allOf": [
|
|
1016
968
|
{
|
|
1017
|
-
"
|
|
969
|
+
"type": "object",
|
|
970
|
+
"properties": {
|
|
971
|
+
"identity": {
|
|
972
|
+
"$ref": "#/$defs/StatelessStrategyId"
|
|
973
|
+
},
|
|
974
|
+
"steps": {
|
|
975
|
+
"type": "array",
|
|
976
|
+
"items": {
|
|
977
|
+
"$ref": "#/$defs/Step"
|
|
978
|
+
},
|
|
979
|
+
"uniqueItems": true
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
"required": [
|
|
983
|
+
"identity",
|
|
984
|
+
"steps"
|
|
985
|
+
]
|
|
1018
986
|
}
|
|
1019
987
|
],
|
|
1020
988
|
"unevaluatedProperties": false,
|
|
1021
|
-
"$anchor": "
|
|
989
|
+
"$anchor": "StatelessStrategy"
|
|
990
|
+
},
|
|
991
|
+
"StatelessStrategyId": {
|
|
992
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
993
|
+
"type": "string",
|
|
994
|
+
"$anchor": "StatelessStrategyId",
|
|
995
|
+
"pattern": "^STATELESSSTRATEGY-.+$"
|
|
1022
996
|
},
|
|
1023
|
-
"
|
|
997
|
+
"Step": {
|
|
1024
998
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1025
999
|
"type": "object",
|
|
1026
1000
|
"oneOf": [
|
|
1027
1001
|
{
|
|
1028
|
-
"$ref": "#/$defs/
|
|
1002
|
+
"$ref": "#/$defs/WorkStep"
|
|
1029
1003
|
},
|
|
1030
1004
|
{
|
|
1031
|
-
"$ref": "#/$defs/
|
|
1005
|
+
"$ref": "#/$defs/BranchStep"
|
|
1032
1006
|
},
|
|
1033
1007
|
{
|
|
1034
|
-
"$ref": "#/$defs/
|
|
1008
|
+
"$ref": "#/$defs/WhileStep"
|
|
1035
1009
|
},
|
|
1036
1010
|
{
|
|
1037
|
-
"$ref": "#/$defs/
|
|
1011
|
+
"$ref": "#/$defs/ForStep"
|
|
1038
1012
|
}
|
|
1039
1013
|
],
|
|
1040
|
-
"
|
|
1014
|
+
"unevaluatedProperties": false,
|
|
1015
|
+
"$anchor": "Step"
|
|
1041
1016
|
},
|
|
1042
1017
|
"StepKind": {
|
|
1043
1018
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -1058,41 +1033,64 @@
|
|
|
1058
1033
|
],
|
|
1059
1034
|
"$anchor": "StepKind"
|
|
1060
1035
|
},
|
|
1061
|
-
"
|
|
1036
|
+
"StrategyState": {
|
|
1062
1037
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1063
1038
|
"type": "object",
|
|
1064
1039
|
"properties": {
|
|
1065
|
-
"
|
|
1066
|
-
"
|
|
1067
|
-
"format": "date-time"
|
|
1040
|
+
"strategyState": {
|
|
1041
|
+
"$ref": "#/$defs/StrategyStateValue"
|
|
1068
1042
|
}
|
|
1069
1043
|
},
|
|
1070
1044
|
"required": [
|
|
1071
|
-
"
|
|
1045
|
+
"strategyState"
|
|
1072
1046
|
],
|
|
1073
|
-
"$anchor": "
|
|
1047
|
+
"$anchor": "StrategyState"
|
|
1074
1048
|
},
|
|
1075
|
-
"
|
|
1049
|
+
"StrategyStateValue": {
|
|
1050
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1051
|
+
"type": "object",
|
|
1052
|
+
"additionalProperties": {
|
|
1053
|
+
"type": "object",
|
|
1054
|
+
"additionalProperties": {
|
|
1055
|
+
"oneOf": [
|
|
1056
|
+
{
|
|
1057
|
+
"$ref": "#/$defs/ResourcePotentialInput"
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
"$ref": "#/$defs/ResourcePotentialOutput"
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
"$ref": "#/$defs/Resource"
|
|
1064
|
+
}
|
|
1065
|
+
]
|
|
1066
|
+
},
|
|
1067
|
+
"propertyNames": {
|
|
1068
|
+
"$ref": "#/$defs/ResourceRoleId"
|
|
1069
|
+
}
|
|
1070
|
+
},
|
|
1071
|
+
"$anchor": "StrategyStateValue",
|
|
1072
|
+
"propertyNames": {
|
|
1073
|
+
"$ref": "#/$defs/ExecutionId"
|
|
1074
|
+
}
|
|
1075
|
+
},
|
|
1076
|
+
"Timestamp": {
|
|
1076
1077
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1077
1078
|
"type": "object",
|
|
1078
1079
|
"properties": {
|
|
1079
|
-
"
|
|
1080
|
+
"timestamp": {
|
|
1080
1081
|
"type": "string",
|
|
1081
|
-
"format": "
|
|
1082
|
+
"format": "date-time"
|
|
1082
1083
|
}
|
|
1083
1084
|
},
|
|
1084
1085
|
"required": [
|
|
1085
|
-
"
|
|
1086
|
+
"timestamp"
|
|
1086
1087
|
],
|
|
1087
|
-
"$anchor": "
|
|
1088
|
+
"$anchor": "Timestamp"
|
|
1088
1089
|
},
|
|
1089
1090
|
"WhileStep": {
|
|
1090
1091
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1091
1092
|
"type": "object",
|
|
1092
1093
|
"allOf": [
|
|
1093
|
-
{
|
|
1094
|
-
"$ref": "#/$defs/Identifiable"
|
|
1095
|
-
},
|
|
1096
1094
|
{
|
|
1097
1095
|
"$ref": "#/$defs/StepKind"
|
|
1098
1096
|
},
|
|
@@ -1102,7 +1100,7 @@
|
|
|
1102
1100
|
"case": {
|
|
1103
1101
|
"$ref": "#/$defs/ConditionalWrapper"
|
|
1104
1102
|
},
|
|
1105
|
-
"
|
|
1103
|
+
"identity": {
|
|
1106
1104
|
"$ref": "#/$defs/WhileStepId"
|
|
1107
1105
|
},
|
|
1108
1106
|
"kind": {
|
|
@@ -1110,7 +1108,7 @@
|
|
|
1110
1108
|
}
|
|
1111
1109
|
},
|
|
1112
1110
|
"required": [
|
|
1113
|
-
"
|
|
1111
|
+
"identity",
|
|
1114
1112
|
"kind",
|
|
1115
1113
|
"case"
|
|
1116
1114
|
]
|
|
@@ -1128,9 +1126,6 @@
|
|
|
1128
1126
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1129
1127
|
"type": "object",
|
|
1130
1128
|
"allOf": [
|
|
1131
|
-
{
|
|
1132
|
-
"$ref": "#/$defs/Identifiable"
|
|
1133
|
-
},
|
|
1134
1129
|
{
|
|
1135
1130
|
"$ref": "#/$defs/StepKind"
|
|
1136
1131
|
},
|
|
@@ -1140,7 +1135,7 @@
|
|
|
1140
1135
|
"execution": {
|
|
1141
1136
|
"$ref": "#/$defs/Execution"
|
|
1142
1137
|
},
|
|
1143
|
-
"
|
|
1138
|
+
"identity": {
|
|
1144
1139
|
"$ref": "#/$defs/WorkStepId"
|
|
1145
1140
|
},
|
|
1146
1141
|
"kind": {
|
|
@@ -1148,7 +1143,7 @@
|
|
|
1148
1143
|
}
|
|
1149
1144
|
},
|
|
1150
1145
|
"required": [
|
|
1151
|
-
"
|
|
1146
|
+
"identity",
|
|
1152
1147
|
"kind",
|
|
1153
1148
|
"execution"
|
|
1154
1149
|
]
|
|
@@ -1161,81 +1156,7 @@
|
|
|
1161
1156
|
"type": "string",
|
|
1162
1157
|
"$anchor": "WorkStepId",
|
|
1163
1158
|
"pattern": "^WORKSTEP-.+$"
|
|
1164
|
-
},
|
|
1165
|
-
"Workflow": {
|
|
1166
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1167
|
-
"type": "object",
|
|
1168
|
-
"allOf": [
|
|
1169
|
-
{
|
|
1170
|
-
"$ref": "#/$defs/Identifiable"
|
|
1171
|
-
},
|
|
1172
|
-
{
|
|
1173
|
-
"type": "object",
|
|
1174
|
-
"properties": {
|
|
1175
|
-
"id": {
|
|
1176
|
-
"$ref": "#/$defs/WorkflowId"
|
|
1177
|
-
},
|
|
1178
|
-
"steps": {
|
|
1179
|
-
"type": "array",
|
|
1180
|
-
"items": {
|
|
1181
|
-
"$ref": "#/$defs/Step"
|
|
1182
|
-
},
|
|
1183
|
-
"uniqueItems": true
|
|
1184
|
-
}
|
|
1185
|
-
},
|
|
1186
|
-
"required": [
|
|
1187
|
-
"id",
|
|
1188
|
-
"steps"
|
|
1189
|
-
]
|
|
1190
|
-
}
|
|
1191
|
-
],
|
|
1192
|
-
"unevaluatedProperties": false,
|
|
1193
|
-
"$anchor": "Workflow"
|
|
1194
|
-
},
|
|
1195
|
-
"WorkflowId": {
|
|
1196
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1197
|
-
"type": "string",
|
|
1198
|
-
"$anchor": "WorkflowId",
|
|
1199
|
-
"pattern": "^WORKFLOW-.+$"
|
|
1200
|
-
},
|
|
1201
|
-
"WorkflowSpec": {
|
|
1202
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1203
|
-
"type": "object",
|
|
1204
|
-
"allOf": [
|
|
1205
|
-
{
|
|
1206
|
-
"$ref": "#/$defs/Identifiable"
|
|
1207
|
-
},
|
|
1208
|
-
{
|
|
1209
|
-
"properties": {
|
|
1210
|
-
"id": {
|
|
1211
|
-
"$ref": "#/$defs/WorkflowSpecId"
|
|
1212
|
-
},
|
|
1213
|
-
"resourceMaps": {
|
|
1214
|
-
"type": "array",
|
|
1215
|
-
"items": {
|
|
1216
|
-
"$ref": "#/$defs/ResourceMap"
|
|
1217
|
-
},
|
|
1218
|
-
"uniqueItems": true
|
|
1219
|
-
},
|
|
1220
|
-
"workflow": {
|
|
1221
|
-
"$ref": "#/$defs/Workflow"
|
|
1222
|
-
}
|
|
1223
|
-
},
|
|
1224
|
-
"required": [
|
|
1225
|
-
"id",
|
|
1226
|
-
"workflow",
|
|
1227
|
-
"resourceMaps"
|
|
1228
|
-
]
|
|
1229
|
-
}
|
|
1230
|
-
],
|
|
1231
|
-
"$anchor": "WorkflowSpec"
|
|
1232
|
-
},
|
|
1233
|
-
"WorkflowSpecId": {
|
|
1234
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1235
|
-
"type": "string",
|
|
1236
|
-
"$anchor": "WorkflowSpecId",
|
|
1237
|
-
"pattern": "^WORKFLOWSPEC-.+$"
|
|
1238
1159
|
}
|
|
1239
1160
|
},
|
|
1240
|
-
"$comment": "This schema defines all genesis schemas used throughout the Toolproof ecosystem. The genesis schemas themselves are defined in $defs.<ResourceType>.extractionSchema. The build process (via extractSchemas.js) extracts these schemas and writes them to a separate file (src/schemas/Genesis.json). The reason for this indirection is to have all these schema envelopes validate positively against the schema at $defs/
|
|
1161
|
+
"$comment": "This schema defines all genesis schemas used throughout the Toolproof ecosystem. The genesis schemas themselves are defined in $defs.<ResourceType>.extractionSchema. The build process (via extractSchemas.js) extracts these schemas and writes them to a separate file (src/schemas/Genesis.json). The reason for this indirection is to have all these schema envelopes validate positively against the schema at $defs/ResourceType, effectively making them ResourceTypes, which are first-class citizens in the Toolproof ecosystem."
|
|
1241
1162
|
}
|