Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v08 spec alignment - Workflow start no longer a required property #84

Merged
merged 2 commits into from
Sep 30, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion model/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type BaseWorkflow struct {
Description string `json:"description,omitempty"`
// Workflow version
Version string `json:"version" validate:"omitempty,min=1"`
Start *Start `json:"start" validate:"required"`
Start *Start `json:"start" validate:"omitempty"`
spolti marked this conversation as resolved.
Show resolved Hide resolved
// Annotations List of helpful terms describing the workflows intended purpose, subject areas, or other important qualities
Annotations []string `json:"annotations,omitempty"`
// DataInputSchema URI of the JSON Schema used to validate the workflow data input
Expand Down
1 change: 1 addition & 0 deletions parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func TestFromFile(t *testing.T) {
},
"./testdata/workflows/greetings-v08-spec.sw.yaml": func(t *testing.T, w *model.Workflow) {
assert.Empty(t, w.Name)
assert.Empty(t, w.Start)
assert.IsType(t, &model.OperationState{}, w.States[0])
assert.Equal(t, "custom.greeting", w.ID)
assert.NotEmpty(t, w.States[0].(*model.OperationState).Actions)
Expand Down
2 changes: 0 additions & 2 deletions parser/testdata/workflows/greetings-v08-spec.sw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ id: custom.greeting
version: '1.0'
description: Greet Someone
specVersion: "0.8"
start:
stateName: Greet
functions:
- name: greetingCustomFunction
operation: /path/to/my/script/greeting.ts#CustomGreeting
Expand Down