From 6876520132f3bb22ff076e6a223b7114e936c611 Mon Sep 17 00:00:00 2001 From: Chuang Wang Date: Mon, 4 Jul 2022 14:35:18 -0700 Subject: [PATCH] Export ValidateObjectKeys function Export this function for chains to use it. https://github.com/tektoncd/pipeline/issues/5072 --- pkg/apis/pipeline/v1beta1/task_validation.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/apis/pipeline/v1beta1/task_validation.go b/pkg/apis/pipeline/v1beta1/task_validation.go index 7e3ceb59b7b..8cacb881ae4 100644 --- a/pkg/apis/pipeline/v1beta1/task_validation.go +++ b/pkg/apis/pipeline/v1beta1/task_validation.go @@ -400,13 +400,13 @@ func validateObjectUsage(ctx context.Context, steps []Step, params []ParamSpec) // slice of ParamSpecs are provided in default iff the default section is provided. func validateObjectDefault(objectParams []ParamSpec) (errs *apis.FieldError) { for _, p := range objectParams { - errs = errs.Also(validateObjectKeys(p.Properties, p.Default).ViaField(p.Name)) + errs = errs.Also(ValidateObjectKeys(p.Properties, p.Default).ViaField(p.Name)) } return errs } -// validateObjectKeys validates if object keys defined in properties are all provided in its value provider iff the provider is not nil. -func validateObjectKeys(properties map[string]PropertySpec, propertiesProvider *ArrayOrString) (errs *apis.FieldError) { +// ValidateObjectKeys validates if object keys defined in properties are all provided in its value provider iff the provider is not nil. +func ValidateObjectKeys(properties map[string]PropertySpec, propertiesProvider *ArrayOrString) (errs *apis.FieldError) { if propertiesProvider == nil || propertiesProvider.ObjectVal == nil { return nil }