MCPcopy
hub / github.com/argoproj/argo-workflows / ValidateWorkflowTemplateRefFields

Function ValidateWorkflowTemplateRefFields

workflow/validate/validate.go:363–368  ·  view source on GitHub ↗
(wfSpec wfv1.WorkflowSpec)

Source from the content-addressed store, hash-verified

361}
362
363func 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.
371func ValidateWorkflowTemplate(ctx context.Context, wftmplGetter templateresolution.WorkflowTemplateNamespacedGetter, cwftmplGetter templateresolution.ClusterWorkflowTemplateGetter, wftmpl *wfv1.WorkflowTemplate, wfDefaults *wfv1.Workflow, opts ValidateOpts) error {

Callers 1

ValidateWorkflowFunction · 0.85

Calls 1

ErrorfFunction · 0.92

Tested by

no test coverage detected