Skip to content

Commit 4acf372

Browse files
Merge pull request #131 from jaymiracola/validation-fix-string-transform
2 parents 3ad61a0 + 314a178 commit 4acf372

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

input/v1beta1/resources_transforms.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,9 @@ const (
231231
type StringTransform struct {
232232

233233
// Type of the string transform to be run.
234-
// +optional
235234
// +kubebuilder:validation:Enum=Format;Convert;TrimPrefix;TrimSuffix;Regexp
236235
// +kubebuilder:default=Format
237-
Type StringTransformType `json:"type,omitempty"`
236+
Type StringTransformType `json:"type"`
238237

239238
// Format the input using a Go format string. See
240239
// https://golang.org/pkg/fmt/ for details.

package/input/pt.fn.crossplane.io_resources.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ spec:
361361
- TrimSuffix
362362
- Regexp
363363
type: string
364+
required:
365+
- type
364366
type: object
365367
type:
366368
description: Type of the transform to be run.
@@ -734,6 +736,8 @@ spec:
734736
- TrimSuffix
735737
- Regexp
736738
type: string
739+
required:
740+
- type
737741
type: object
738742
type:
739743
description: Type of the transform to be run.
@@ -1167,6 +1171,8 @@ spec:
11671171
- TrimSuffix
11681172
- Regexp
11691173
type: string
1174+
required:
1175+
- type
11701176
type: object
11711177
type:
11721178
description: Type of the transform to be run.

0 commit comments

Comments
 (0)