Skip to content

Commit 3af7606

Browse files
authored
v08 spec alignment - Workflow start no longer a required property (#84)
* v08 spec alignment - Workflow start no longer a required property Signed-off-by: spolti <filippespolti@gmail.com> * Update model/workflow.go Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com> Signed-off-by: spolti <filippespolti@gmail.com> Signed-off-by: spolti <filippespolti@gmail.com>
1 parent 503471e commit 3af7606

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

model/workflow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type BaseWorkflow struct {
6363
Description string `json:"description,omitempty"`
6464
// Workflow version
6565
Version string `json:"version" validate:"omitempty,min=1"`
66-
Start *Start `json:"start" validate:"required"`
66+
Start *Start `json:"start,omitempty"`
6767
// Annotations List of helpful terms describing the workflows intended purpose, subject areas, or other important qualities
6868
Annotations []string `json:"annotations,omitempty"`
6969
// DataInputSchema URI of the JSON Schema used to validate the workflow data input

parser/parser_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ func TestFromFile(t *testing.T) {
6868
},
6969
"./testdata/workflows/greetings-v08-spec.sw.yaml": func(t *testing.T, w *model.Workflow) {
7070
assert.Empty(t, w.Name)
71+
assert.Empty(t, w.Start)
7172
assert.IsType(t, &model.OperationState{}, w.States[0])
7273
assert.Equal(t, "custom.greeting", w.ID)
7374
assert.NotEmpty(t, w.States[0].(*model.OperationState).Actions)

parser/testdata/workflows/greetings-v08-spec.sw.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ id: custom.greeting
1616
version: '1.0'
1717
description: Greet Someone
1818
specVersion: "0.8"
19-
start:
20-
stateName: Greet
2119
functions:
2220
- name: greetingCustomFunction
2321
operation: /path/to/my/script/greeting.ts#CustomGreeting

0 commit comments

Comments
 (0)