Skip to content

Commit

Permalink
Export ValidateObjectKeys function
Browse files Browse the repository at this point in the history
Export this function for chains to use it.
#5072
  • Loading branch information
chuangw6 authored and tekton-robot committed Jul 5, 2022
1 parent 380dbd0 commit 6876520
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/apis/pipeline/v1beta1/task_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 6876520

Please sign in to comment.