You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Invalid: Field marker on named array type (should use type definition)
85
-
// +kubebuilder:validation:MinItems=5 // want `marker "kubebuilder:validation:MinItems": marker should be declared on the type definition of StringArray instead of the field`
// +kubebuilder:validation:MinItems=5 // want `marker "kubebuilder:validation:MinItems": marker should be declared on the type definition of FieldMarkerOnNamedArray instead of the field`
Licensed under the Apache License, Version 2.0 (the "License");
5
+
you may not use this file except in compliance with the License.
6
+
You may obtain a copy of the License at
7
+
8
+
http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+
Unless required by applicable law or agreed to in writing, software
11
+
distributed under the License is distributed on an "AS IS" BASIS,
12
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+
See the License for the specific language governing permissions and
14
+
limitations under the License.
15
+
*/
16
+
package a
17
+
18
+
// +kubebuilder:validation:MinItems=1
19
+
// +kubebuilder:validation:MaxItems=10
20
+
// +kubebuilder:validation:UniqueItems=true
21
+
type StringArray []string
22
+
23
+
// +kubebuilder:validation:MinItems=0
24
+
type IntegerArray []int32
25
+
26
+
// +kubebuilder:validation:MaxItems=100
27
+
type BooleanArray []bool
28
+
29
+
// +kubebuilder:validation:MinItems=5 // want `marker "kubebuilder:validation:MinItems": marker should be declared on the type definition of FieldMarkerOnNamedArray instead of the field`
30
+
type FieldMarkerOnNamedArray []string
31
+
32
+
// Type definitions with invalid markers
33
+
type InvalidArrayMarkerOnStringType string
34
+
35
+
type InvalidArrayMarkerOnMapType map[string]string
0 commit comments