Skip to content

Commit

Permalink
Remove no more needed check on reserved keyword for kamelet (#1578)
Browse files Browse the repository at this point in the history
fixes #1577

see also CAMEL-17788

Signed-off-by: Aurélien Pupier <apupier@redhat.com>
  • Loading branch information
apupier committed Aug 14, 2023
1 parent df91824 commit e0ed1f8
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions script/validator/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ import (
)

var (
// Needed until this is fixed: https://issues.apache.org/jira/browse/CAMEL-16788
forbiddenParameterNames = []string{"home", "hostname", "language", "lang", "namespace", "path", "podname", "pod-name", "port", "pwd", "shell", "term"}

paramRegexp = regexp.MustCompile(`{{[?]?([A-Za-z0-9-._]+)(?:[:][^}]*)?}}`)
)

Expand Down Expand Up @@ -270,11 +267,6 @@ func verifyParameters(kamelets []KameletInfo) (errors []error) {
errors = append(errors, fmt.Errorf("kamelet %q does not contain a definition of type \"object\"", kamelet.Name))
}
for k, p := range kamelet.Spec.Definition.Properties {
for _, f := range forbiddenParameterNames {
if strings.EqualFold(k, f) {
errors = append(errors, fmt.Errorf("property name %q is using a reserved keyword in kamelet %q", k, kamelet.Name))
}
}
if p.Type == "" {
errors = append(errors, fmt.Errorf("property %q in kamelet %q does not contain type", k, kamelet.Name))
}
Expand Down

0 comments on commit e0ed1f8

Please sign in to comment.