Skip to content

Commit ee78bba

Browse files
authored
add json tag in the BaseWorkflow (#169)
1 parent 337db7a commit ee78bba

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

kubernetes/k8s_workflow_integration.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,7 @@ import (
3737

3838
// ServerlessWorkflowSpec defines a base API for integration test with operator-sdk
3939
type ServerlessWorkflowSpec struct {
40-
BaseWorkflow model.BaseWorkflow `json:",inline"`
41-
Events []model.Event `json:"events,omitempty"`
42-
Functions []model.Function `json:"functions,omitempty"`
43-
Retries []model.Retry `json:"retries,omitempty"`
44-
// +kubebuilder:validation:MinItems=1
45-
// +kubebuilder:pruning:PreserveUnknownFields
46-
States []model.State `json:"states"`
40+
model.Workflow `json:",inline"`
4741
}
4842

4943
// ServerlessWorkflow ...

model/workflow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func (r *AuthArray) unmarshalMany(data []byte) error {
169169

170170
// Workflow base definition
171171
type Workflow struct {
172-
BaseWorkflow
172+
BaseWorkflow `json:",inline"`
173173
// +kubebuilder:validation:MinItems=1
174174
States []State `json:"states" validate:"required,min=1,dive"`
175175
// +optional

0 commit comments

Comments
 (0)