@toolproof-npm/schema 0.1.34 → 0.1.36
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 +12 -12
- 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 +61 -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 +495 -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 +2120 -0
- package/dist/{schemas → genesis/generated/schemas}/Genesis.json +273 -345
- 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 +368 -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 +1530 -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 +125 -83
- package/dist/scripts/rewriteAnchors.d.ts +1 -0
- package/dist/scripts/rewriteAnchors.js +90 -0
- package/package.json +6 -3
- 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
|
},
|
|
@@ -231,6 +244,13 @@
|
|
|
231
244
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
232
245
|
"type": "object"
|
|
233
246
|
},
|
|
247
|
+
"required": {
|
|
248
|
+
"type": "array",
|
|
249
|
+
"items": {
|
|
250
|
+
"type": "string"
|
|
251
|
+
},
|
|
252
|
+
"uniqueItems": true
|
|
253
|
+
},
|
|
234
254
|
"additionalProperties": {
|
|
235
255
|
"const": false
|
|
236
256
|
},
|
|
@@ -244,6 +264,7 @@
|
|
|
244
264
|
},
|
|
245
265
|
"required": [
|
|
246
266
|
"$schema",
|
|
267
|
+
"$anchor",
|
|
247
268
|
"type"
|
|
248
269
|
],
|
|
249
270
|
"unevaluatedProperties": false,
|
|
@@ -253,9 +274,6 @@
|
|
|
253
274
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
254
275
|
"type": "object",
|
|
255
276
|
"allOf": [
|
|
256
|
-
{
|
|
257
|
-
"$ref": "#/$defs/Identifiable"
|
|
258
|
-
},
|
|
259
277
|
{
|
|
260
278
|
"$ref": "#/$defs/StepKind"
|
|
261
279
|
},
|
|
@@ -265,7 +283,7 @@
|
|
|
265
283
|
"case": {
|
|
266
284
|
"$ref": "#/$defs/ConditionalWrapper"
|
|
267
285
|
},
|
|
268
|
-
"
|
|
286
|
+
"identity": {
|
|
269
287
|
"$ref": "#/$defs/ForStepId"
|
|
270
288
|
},
|
|
271
289
|
"kind": {
|
|
@@ -273,7 +291,7 @@
|
|
|
273
291
|
}
|
|
274
292
|
},
|
|
275
293
|
"required": [
|
|
276
|
-
"
|
|
294
|
+
"identity",
|
|
277
295
|
"kind",
|
|
278
296
|
"case"
|
|
279
297
|
]
|
|
@@ -287,50 +305,42 @@
|
|
|
287
305
|
"$anchor": "ForStepId",
|
|
288
306
|
"pattern": "^FORSTEP-.+$"
|
|
289
307
|
},
|
|
290
|
-
"
|
|
308
|
+
"IdSchemaValue": {
|
|
291
309
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
292
310
|
"type": "object",
|
|
293
|
-
"
|
|
294
|
-
{
|
|
295
|
-
"
|
|
311
|
+
"properties": {
|
|
312
|
+
"type": {
|
|
313
|
+
"const": "string"
|
|
296
314
|
},
|
|
297
|
-
{
|
|
298
|
-
"
|
|
299
|
-
|
|
300
|
-
"$ref": "#/$defs/ResourceFormatId"
|
|
301
|
-
}
|
|
302
|
-
},
|
|
303
|
-
"required": [
|
|
304
|
-
"id"
|
|
305
|
-
]
|
|
315
|
+
"pattern": {
|
|
316
|
+
"type": "string",
|
|
317
|
+
"pattern": "^[A-Z][A-Z0-9._-]*-.+$"
|
|
306
318
|
}
|
|
307
|
-
|
|
308
|
-
"$anchor": "FormatBase"
|
|
309
|
-
},
|
|
310
|
-
"Identifiable": {
|
|
311
|
-
"type": "object",
|
|
319
|
+
},
|
|
312
320
|
"required": [
|
|
313
|
-
"
|
|
321
|
+
"type",
|
|
322
|
+
"pattern"
|
|
314
323
|
],
|
|
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"
|
|
324
|
+
"$anchor": "IdSchemaValue"
|
|
329
325
|
},
|
|
330
326
|
"IdentityProp": {
|
|
331
327
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
332
328
|
"type": "object",
|
|
333
329
|
"properties": {
|
|
330
|
+
"$defs": {
|
|
331
|
+
"type": "object",
|
|
332
|
+
"additionalProperties": true,
|
|
333
|
+
"$comment": "Ajv-specific: patternRequired enforces at least one Id-like key in this $defs block when identity is present.",
|
|
334
|
+
"minProperties": 1,
|
|
335
|
+
"patternProperties": {
|
|
336
|
+
"^[A-Za-z][A-Za-z0-9._-]*Id$": {
|
|
337
|
+
"$ref": "#/$defs/IdSchemaValue"
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"patternRequired": [
|
|
341
|
+
"^[A-Za-z][A-Za-z0-9._-]*Id$"
|
|
342
|
+
]
|
|
343
|
+
},
|
|
334
344
|
"properties": {
|
|
335
345
|
"type": "object",
|
|
336
346
|
"properties": {
|
|
@@ -354,6 +364,7 @@
|
|
|
354
364
|
}
|
|
355
365
|
},
|
|
356
366
|
"required": [
|
|
367
|
+
"$defs",
|
|
357
368
|
"required",
|
|
358
369
|
"properties"
|
|
359
370
|
],
|
|
@@ -362,36 +373,17 @@
|
|
|
362
373
|
"IdentityValue": {
|
|
363
374
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
364
375
|
"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
|
-
]
|
|
376
|
+
"properties": {
|
|
377
|
+
"$ref": {
|
|
378
|
+
"type": "string",
|
|
379
|
+
"$comment": "Anchors-only: use #<Name>Id for identity refs. Top-level and nested $defs should expose an $anchor matching <Name>Id.",
|
|
380
|
+
"pattern": "^#[A-Za-z][A-Za-z0-9._-]*Id$"
|
|
393
381
|
}
|
|
382
|
+
},
|
|
383
|
+
"required": [
|
|
384
|
+
"$ref"
|
|
394
385
|
],
|
|
386
|
+
"additionalProperties": false,
|
|
395
387
|
"$anchor": "IdentityValue"
|
|
396
388
|
},
|
|
397
389
|
"Job": {
|
|
@@ -399,26 +391,37 @@
|
|
|
399
391
|
"type": "object",
|
|
400
392
|
"allOf": [
|
|
401
393
|
{
|
|
402
|
-
"
|
|
394
|
+
"properties": {
|
|
395
|
+
"identity": {
|
|
396
|
+
"$ref": "#/$defs/JobId"
|
|
397
|
+
},
|
|
398
|
+
"implementation": {
|
|
399
|
+
"type": "string",
|
|
400
|
+
"format": "uri"
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
"required": [
|
|
404
|
+
"identity",
|
|
405
|
+
"implementation"
|
|
406
|
+
]
|
|
403
407
|
},
|
|
404
408
|
{
|
|
405
|
-
"$ref": "#/$defs/
|
|
409
|
+
"$ref": "#/$defs/Documented"
|
|
406
410
|
},
|
|
407
411
|
{
|
|
408
|
-
"$ref": "#/$defs/
|
|
409
|
-
}
|
|
410
|
-
],
|
|
411
|
-
"properties": {
|
|
412
|
-
"identity": {
|
|
413
|
-
"type": "string"
|
|
412
|
+
"$ref": "#/$defs/RolesOuter"
|
|
414
413
|
}
|
|
415
|
-
},
|
|
416
|
-
"required": [
|
|
417
|
-
"identity"
|
|
418
414
|
],
|
|
419
415
|
"unevaluatedProperties": false,
|
|
420
416
|
"$anchor": "Job"
|
|
421
417
|
},
|
|
418
|
+
"JobId": {
|
|
419
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
420
|
+
"type": "string",
|
|
421
|
+
"$anchor": "JobId",
|
|
422
|
+
"$comment": "",
|
|
423
|
+
"pattern": "^JOB-.+$"
|
|
424
|
+
},
|
|
422
425
|
"JsonValue": {
|
|
423
426
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
424
427
|
"oneOf": [
|
|
@@ -542,30 +545,46 @@
|
|
|
542
545
|
],
|
|
543
546
|
"$anchor": "PendingRef"
|
|
544
547
|
},
|
|
545
|
-
"
|
|
548
|
+
"Resource": {
|
|
546
549
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
547
550
|
"type": "object",
|
|
548
551
|
"allOf": [
|
|
549
552
|
{
|
|
550
|
-
"$ref": "#/$defs/
|
|
553
|
+
"$ref": "#/$defs/ResourceMetaBase"
|
|
551
554
|
},
|
|
552
555
|
{
|
|
553
556
|
"properties": {
|
|
554
|
-
"
|
|
555
|
-
"
|
|
557
|
+
"extractedData": {
|
|
558
|
+
"type": "object",
|
|
559
|
+
"additionalProperties": {
|
|
560
|
+
"$ref": "#/$defs/JsonValue"
|
|
561
|
+
},
|
|
562
|
+
"$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
563
|
}
|
|
557
564
|
},
|
|
558
565
|
"required": [
|
|
559
|
-
"
|
|
566
|
+
"extractedData"
|
|
560
567
|
]
|
|
561
|
-
}
|
|
568
|
+
}
|
|
569
|
+
],
|
|
570
|
+
"unevaluatedProperties": false,
|
|
571
|
+
"$anchor": "Resource"
|
|
572
|
+
},
|
|
573
|
+
"ResourceBase": {
|
|
574
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
575
|
+
"type": "object",
|
|
576
|
+
"allOf": [
|
|
562
577
|
{
|
|
563
578
|
"properties": {
|
|
579
|
+
"identity": {
|
|
580
|
+
"$ref": "#/$defs/ResourceId"
|
|
581
|
+
},
|
|
564
582
|
"resourceTypeId": {
|
|
565
583
|
"$ref": "#/$defs/ResourceTypeId"
|
|
566
584
|
}
|
|
567
585
|
},
|
|
568
586
|
"required": [
|
|
587
|
+
"identity",
|
|
569
588
|
"resourceTypeId"
|
|
570
589
|
]
|
|
571
590
|
},
|
|
@@ -575,53 +594,25 @@
|
|
|
575
594
|
],
|
|
576
595
|
"$anchor": "ResourceBase"
|
|
577
596
|
},
|
|
578
|
-
"
|
|
597
|
+
"ResourceFormat": {
|
|
579
598
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
580
599
|
"type": "object",
|
|
581
600
|
"allOf": [
|
|
582
|
-
{
|
|
583
|
-
"$ref": "#/$defs/ResourceMetaBase"
|
|
584
|
-
},
|
|
585
601
|
{
|
|
586
602
|
"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."
|
|
603
|
+
"identity": {
|
|
604
|
+
"$ref": "#/$defs/ResourceFormatId"
|
|
605
605
|
}
|
|
606
606
|
},
|
|
607
607
|
"required": [
|
|
608
|
-
"
|
|
608
|
+
"identity"
|
|
609
609
|
]
|
|
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": [
|
|
610
|
+
},
|
|
619
611
|
{
|
|
620
|
-
"$ref": "#/$defs/
|
|
612
|
+
"$ref": "#/$defs/Documented"
|
|
621
613
|
}
|
|
622
614
|
],
|
|
623
|
-
"
|
|
624
|
-
"$anchor": "ResourceFormatData"
|
|
615
|
+
"$anchor": "ResourceFormat"
|
|
625
616
|
},
|
|
626
617
|
"ResourceFormatId": {
|
|
627
618
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -629,20 +620,6 @@
|
|
|
629
620
|
"$anchor": "ResourceFormatId",
|
|
630
621
|
"pattern": "^FORMAT-.+$"
|
|
631
622
|
},
|
|
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
623
|
"ResourceId": {
|
|
647
624
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
648
625
|
"type": "string",
|
|
@@ -667,33 +644,6 @@
|
|
|
667
644
|
],
|
|
668
645
|
"$anchor": "ResourceKind"
|
|
669
646
|
},
|
|
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
647
|
"ResourceMeta": {
|
|
698
648
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
699
649
|
"type": "object",
|
|
@@ -722,10 +672,10 @@
|
|
|
722
672
|
]
|
|
723
673
|
},
|
|
724
674
|
{
|
|
725
|
-
"$ref": "#/$defs/
|
|
675
|
+
"$ref": "#/$defs/Timestamp"
|
|
726
676
|
},
|
|
727
677
|
{
|
|
728
|
-
"$ref": "#/$defs/
|
|
678
|
+
"$ref": "#/$defs/Path"
|
|
729
679
|
}
|
|
730
680
|
],
|
|
731
681
|
"$anchor": "ResourceMetaBase"
|
|
@@ -816,7 +766,8 @@
|
|
|
816
766
|
},
|
|
817
767
|
"required": [
|
|
818
768
|
"resourceTypeId"
|
|
819
|
-
]
|
|
769
|
+
],
|
|
770
|
+
"$comment": "A ResourceRole does not have a self-contained identity, as it is always defined in the context of a RoleMap."
|
|
820
771
|
},
|
|
821
772
|
{
|
|
822
773
|
"$ref": "#/$defs/Documented"
|
|
@@ -841,16 +792,13 @@
|
|
|
841
792
|
],
|
|
842
793
|
"$anchor": "ResourceSocket"
|
|
843
794
|
},
|
|
844
|
-
"
|
|
795
|
+
"ResourceType": {
|
|
845
796
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
846
797
|
"type": "object",
|
|
847
798
|
"allOf": [
|
|
848
|
-
{
|
|
849
|
-
"$ref": "#/$defs/IdentifiableDocumented"
|
|
850
|
-
},
|
|
851
799
|
{
|
|
852
800
|
"properties": {
|
|
853
|
-
"
|
|
801
|
+
"identity": {
|
|
854
802
|
"$ref": "#/$defs/ResourceTypeId"
|
|
855
803
|
},
|
|
856
804
|
"resourceFormatId": {
|
|
@@ -858,41 +806,15 @@
|
|
|
858
806
|
}
|
|
859
807
|
},
|
|
860
808
|
"required": [
|
|
861
|
-
"
|
|
809
|
+
"identity",
|
|
862
810
|
"resourceFormatId"
|
|
863
811
|
]
|
|
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
812
|
},
|
|
875
813
|
{
|
|
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"
|
|
814
|
+
"$ref": "#/$defs/Documented"
|
|
893
815
|
},
|
|
894
816
|
{
|
|
895
|
-
"$ref": "#/$defs/
|
|
817
|
+
"$ref": "#/$defs/ExtractionSchema"
|
|
896
818
|
},
|
|
897
819
|
{
|
|
898
820
|
"if": {
|
|
@@ -901,20 +823,36 @@
|
|
|
901
823
|
"const": "FORMAT-ApplicationJson"
|
|
902
824
|
}
|
|
903
825
|
},
|
|
904
|
-
"$comment": "If resourceFormatId is FORMAT-ApplicationJson, then
|
|
826
|
+
"$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
827
|
},
|
|
906
828
|
"then": {
|
|
907
829
|
"not": {
|
|
908
|
-
"
|
|
830
|
+
"required": [
|
|
831
|
+
"extractor"
|
|
832
|
+
]
|
|
909
833
|
}
|
|
910
834
|
},
|
|
911
835
|
"else": {
|
|
912
|
-
"
|
|
836
|
+
"type": "object",
|
|
837
|
+
"properties": {
|
|
838
|
+
"extractor": {
|
|
839
|
+
"type": "string",
|
|
840
|
+
"format": "uri"
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
"required": [
|
|
844
|
+
"extractor"
|
|
845
|
+
]
|
|
913
846
|
}
|
|
914
847
|
}
|
|
915
848
|
],
|
|
916
|
-
"
|
|
917
|
-
|
|
849
|
+
"$anchor": "ResourceType"
|
|
850
|
+
},
|
|
851
|
+
"ResourceTypeId": {
|
|
852
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
853
|
+
"type": "string",
|
|
854
|
+
"$anchor": "ResourceTypeId",
|
|
855
|
+
"pattern": "^TYPE-.+$"
|
|
918
856
|
},
|
|
919
857
|
"RoleBindingMap": {
|
|
920
858
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -1000,44 +938,88 @@
|
|
|
1000
938
|
],
|
|
1001
939
|
"$anchor": "RolesOuter"
|
|
1002
940
|
},
|
|
1003
|
-
"
|
|
941
|
+
"StatefulStrategy": {
|
|
1004
942
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1005
943
|
"type": "object",
|
|
1006
|
-
"
|
|
1007
|
-
{
|
|
1008
|
-
"$ref": "#/$defs/WorkStep"
|
|
1009
|
-
},
|
|
944
|
+
"allOf": [
|
|
1010
945
|
{
|
|
1011
|
-
"
|
|
946
|
+
"properties": {
|
|
947
|
+
"identity": {
|
|
948
|
+
"$ref": "#/$defs/StatefulStrategyId"
|
|
949
|
+
},
|
|
950
|
+
"statelessStrategy": {
|
|
951
|
+
"$ref": "#/$defs/StatelessStrategy"
|
|
952
|
+
}
|
|
953
|
+
},
|
|
954
|
+
"required": [
|
|
955
|
+
"identity",
|
|
956
|
+
"statelessStrategy"
|
|
957
|
+
]
|
|
1012
958
|
},
|
|
1013
959
|
{
|
|
1014
|
-
"$ref": "#/$defs/
|
|
1015
|
-
}
|
|
960
|
+
"$ref": "#/$defs/StrategyState"
|
|
961
|
+
}
|
|
962
|
+
],
|
|
963
|
+
"$anchor": "StatefulStrategy"
|
|
964
|
+
},
|
|
965
|
+
"StatefulStrategyId": {
|
|
966
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
967
|
+
"type": "string",
|
|
968
|
+
"$anchor": "StatefulStrategyId",
|
|
969
|
+
"pattern": "^STATEFULSTRATEGY-.+$"
|
|
970
|
+
},
|
|
971
|
+
"StatelessStrategy": {
|
|
972
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
973
|
+
"type": "object",
|
|
974
|
+
"allOf": [
|
|
1016
975
|
{
|
|
1017
|
-
"
|
|
976
|
+
"type": "object",
|
|
977
|
+
"properties": {
|
|
978
|
+
"identity": {
|
|
979
|
+
"$ref": "#/$defs/StatelessStrategyId"
|
|
980
|
+
},
|
|
981
|
+
"steps": {
|
|
982
|
+
"type": "array",
|
|
983
|
+
"items": {
|
|
984
|
+
"$ref": "#/$defs/Step"
|
|
985
|
+
},
|
|
986
|
+
"uniqueItems": true
|
|
987
|
+
}
|
|
988
|
+
},
|
|
989
|
+
"required": [
|
|
990
|
+
"identity",
|
|
991
|
+
"steps"
|
|
992
|
+
]
|
|
1018
993
|
}
|
|
1019
994
|
],
|
|
1020
995
|
"unevaluatedProperties": false,
|
|
1021
|
-
"$anchor": "
|
|
996
|
+
"$anchor": "StatelessStrategy"
|
|
1022
997
|
},
|
|
1023
|
-
"
|
|
998
|
+
"StatelessStrategyId": {
|
|
999
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1000
|
+
"type": "string",
|
|
1001
|
+
"$anchor": "StatelessStrategyId",
|
|
1002
|
+
"pattern": "^STATELESSSTRATEGY-.+$"
|
|
1003
|
+
},
|
|
1004
|
+
"Step": {
|
|
1024
1005
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1025
1006
|
"type": "object",
|
|
1026
1007
|
"oneOf": [
|
|
1027
1008
|
{
|
|
1028
|
-
"$ref": "#/$defs/
|
|
1009
|
+
"$ref": "#/$defs/WorkStep"
|
|
1029
1010
|
},
|
|
1030
1011
|
{
|
|
1031
|
-
"$ref": "#/$defs/
|
|
1012
|
+
"$ref": "#/$defs/BranchStep"
|
|
1032
1013
|
},
|
|
1033
1014
|
{
|
|
1034
|
-
"$ref": "#/$defs/
|
|
1015
|
+
"$ref": "#/$defs/WhileStep"
|
|
1035
1016
|
},
|
|
1036
1017
|
{
|
|
1037
|
-
"$ref": "#/$defs/
|
|
1018
|
+
"$ref": "#/$defs/ForStep"
|
|
1038
1019
|
}
|
|
1039
1020
|
],
|
|
1040
|
-
"
|
|
1021
|
+
"unevaluatedProperties": false,
|
|
1022
|
+
"$anchor": "Step"
|
|
1041
1023
|
},
|
|
1042
1024
|
"StepKind": {
|
|
1043
1025
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -1058,41 +1040,64 @@
|
|
|
1058
1040
|
],
|
|
1059
1041
|
"$anchor": "StepKind"
|
|
1060
1042
|
},
|
|
1061
|
-
"
|
|
1043
|
+
"StrategyState": {
|
|
1062
1044
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1063
1045
|
"type": "object",
|
|
1064
1046
|
"properties": {
|
|
1065
|
-
"
|
|
1066
|
-
"
|
|
1067
|
-
"format": "date-time"
|
|
1047
|
+
"strategyState": {
|
|
1048
|
+
"$ref": "#/$defs/StrategyStateValue"
|
|
1068
1049
|
}
|
|
1069
1050
|
},
|
|
1070
1051
|
"required": [
|
|
1071
|
-
"
|
|
1052
|
+
"strategyState"
|
|
1072
1053
|
],
|
|
1073
|
-
"$anchor": "
|
|
1054
|
+
"$anchor": "StrategyState"
|
|
1055
|
+
},
|
|
1056
|
+
"StrategyStateValue": {
|
|
1057
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1058
|
+
"type": "object",
|
|
1059
|
+
"additionalProperties": {
|
|
1060
|
+
"type": "object",
|
|
1061
|
+
"additionalProperties": {
|
|
1062
|
+
"oneOf": [
|
|
1063
|
+
{
|
|
1064
|
+
"$ref": "#/$defs/ResourcePotentialInput"
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
"$ref": "#/$defs/ResourcePotentialOutput"
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
"$ref": "#/$defs/Resource"
|
|
1071
|
+
}
|
|
1072
|
+
]
|
|
1073
|
+
},
|
|
1074
|
+
"propertyNames": {
|
|
1075
|
+
"$ref": "#/$defs/ResourceRoleId"
|
|
1076
|
+
}
|
|
1077
|
+
},
|
|
1078
|
+
"$anchor": "StrategyStateValue",
|
|
1079
|
+
"propertyNames": {
|
|
1080
|
+
"$ref": "#/$defs/ExecutionId"
|
|
1081
|
+
}
|
|
1074
1082
|
},
|
|
1075
|
-
"
|
|
1083
|
+
"Timestamp": {
|
|
1076
1084
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1077
1085
|
"type": "object",
|
|
1078
1086
|
"properties": {
|
|
1079
|
-
"
|
|
1087
|
+
"timestamp": {
|
|
1080
1088
|
"type": "string",
|
|
1081
|
-
"format": "
|
|
1089
|
+
"format": "date-time"
|
|
1082
1090
|
}
|
|
1083
1091
|
},
|
|
1084
1092
|
"required": [
|
|
1085
|
-
"
|
|
1093
|
+
"timestamp"
|
|
1086
1094
|
],
|
|
1087
|
-
"$anchor": "
|
|
1095
|
+
"$anchor": "Timestamp"
|
|
1088
1096
|
},
|
|
1089
1097
|
"WhileStep": {
|
|
1090
1098
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1091
1099
|
"type": "object",
|
|
1092
1100
|
"allOf": [
|
|
1093
|
-
{
|
|
1094
|
-
"$ref": "#/$defs/Identifiable"
|
|
1095
|
-
},
|
|
1096
1101
|
{
|
|
1097
1102
|
"$ref": "#/$defs/StepKind"
|
|
1098
1103
|
},
|
|
@@ -1102,7 +1107,7 @@
|
|
|
1102
1107
|
"case": {
|
|
1103
1108
|
"$ref": "#/$defs/ConditionalWrapper"
|
|
1104
1109
|
},
|
|
1105
|
-
"
|
|
1110
|
+
"identity": {
|
|
1106
1111
|
"$ref": "#/$defs/WhileStepId"
|
|
1107
1112
|
},
|
|
1108
1113
|
"kind": {
|
|
@@ -1110,7 +1115,7 @@
|
|
|
1110
1115
|
}
|
|
1111
1116
|
},
|
|
1112
1117
|
"required": [
|
|
1113
|
-
"
|
|
1118
|
+
"identity",
|
|
1114
1119
|
"kind",
|
|
1115
1120
|
"case"
|
|
1116
1121
|
]
|
|
@@ -1128,9 +1133,6 @@
|
|
|
1128
1133
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
1129
1134
|
"type": "object",
|
|
1130
1135
|
"allOf": [
|
|
1131
|
-
{
|
|
1132
|
-
"$ref": "#/$defs/Identifiable"
|
|
1133
|
-
},
|
|
1134
1136
|
{
|
|
1135
1137
|
"$ref": "#/$defs/StepKind"
|
|
1136
1138
|
},
|
|
@@ -1140,7 +1142,7 @@
|
|
|
1140
1142
|
"execution": {
|
|
1141
1143
|
"$ref": "#/$defs/Execution"
|
|
1142
1144
|
},
|
|
1143
|
-
"
|
|
1145
|
+
"identity": {
|
|
1144
1146
|
"$ref": "#/$defs/WorkStepId"
|
|
1145
1147
|
},
|
|
1146
1148
|
"kind": {
|
|
@@ -1148,7 +1150,7 @@
|
|
|
1148
1150
|
}
|
|
1149
1151
|
},
|
|
1150
1152
|
"required": [
|
|
1151
|
-
"
|
|
1153
|
+
"identity",
|
|
1152
1154
|
"kind",
|
|
1153
1155
|
"execution"
|
|
1154
1156
|
]
|
|
@@ -1161,81 +1163,7 @@
|
|
|
1161
1163
|
"type": "string",
|
|
1162
1164
|
"$anchor": "WorkStepId",
|
|
1163
1165
|
"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
1166
|
}
|
|
1239
1167
|
},
|
|
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/
|
|
1168
|
+
"$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
1169
|
}
|