Skip to content

Commit dbd0e63

Browse files
author
Alan Christie
committed
feat: Defines RFC1035 pattern and basic step array
1 parent 47f326c commit dbd0e63

File tree

2 files changed

+46
-3
lines changed

2 files changed

+46
-3
lines changed

tests/test_decoder_minimal.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
_MINIMAL: Dict[str, Any] = {
1313
"kind": "DataManagerWorkflow",
1414
"kind-version": "2024.1",
15-
"name": "test-minimal",
15+
"name": "workflow-minimal",
16+
"steps": [
17+
{
18+
"name": "step-1",
19+
"specification": "{}",
20+
}
21+
],
1622
}
1723

1824

workflow/workflow-schema.yaml

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ title: Data Manager Workflow Schema
99
description: >-
1010
The Schema for Data Manager Workflows
1111
12+
# The root-level object -------------------------------------------------------
13+
1214
type: object
1315
properties:
1416
kind:
@@ -17,12 +19,47 @@ properties:
1719
enum:
1820
- '2024.1'
1921
name:
20-
type: string
21-
description: The name of the workflow
22+
$ref: '#/definitions/rfc1035-label-name'
2223
description:
2324
type: string
2425
description: A description of the workflow
26+
author:
27+
type: string
28+
description: The author of the workflow
29+
last-editor:
30+
type: string
31+
description: The last person to modify the workflow
32+
steps:
33+
type: array
34+
items:
35+
$ref: "#/definitions/step"
2536
required:
2637
- kind
2738
- kind-version
2839
- name
40+
- steps
41+
42+
# Sub-object definitions ------------------------------------------------------
43+
44+
definitions:
45+
46+
# RFC 1035 Label Names (as used in Kubernetes)
47+
# See https://kubernetes.io/docs/concepts/overview/working-with-objects/names/
48+
rfc1035-label-name:
49+
type: string
50+
pattern: ^[a-z][a-z0-9-]{,63}(?<!-)$
51+
52+
step:
53+
type: object
54+
properties:
55+
name:
56+
$ref: '#/definitions/rfc1035-label-name'
57+
description:
58+
type: string
59+
description: A description of the step
60+
specification:
61+
type: string
62+
description: The Data Manager Job Specification, a JSON string
63+
required:
64+
- name
65+
- specification

0 commit comments

Comments
 (0)