(wfSpec wfv1.WorkflowSpec)
| 361 | } |
| 362 | |
| 363 | func ValidateWorkflowTemplateRefFields(wfSpec wfv1.WorkflowSpec) error { |
| 364 | if len(wfSpec.Templates) > 0 { |
| 365 | return errors.Errorf(errors.CodeBadRequest, "Templates is invalid field in spec if workflow referred WorkflowTemplate reference") |
| 366 | } |
| 367 | return nil |
| 368 | } |
| 369 | |
| 370 | // ValidateWorkflowTemplate accepts a workflow template and performs validation against it. |
| 371 | func ValidateWorkflowTemplate(ctx context.Context, wftmplGetter templateresolution.WorkflowTemplateNamespacedGetter, cwftmplGetter templateresolution.ClusterWorkflowTemplateGetter, wftmpl *wfv1.WorkflowTemplate, wfDefaults *wfv1.Workflow, opts ValidateOpts) error { |
no test coverage detected