File tree Expand file tree Collapse file tree 13 files changed +39
-25
lines changed
staging/src/k8s.io/code-generator/examples
HyphenGroup/apis/example/v1
MixedCase/apis/example/v1 Expand file tree Collapse file tree 13 files changed +39
-25
lines changed Original file line number Diff line number Diff line change @@ -43,16 +43,16 @@ type TestTypeList struct {
43
43
}
44
44
45
45
type TestTypeStatus struct {
46
- Blah string
46
+ Blah string `json:"blah"`
47
47
}
48
48
49
49
// +genclient:nonNamespaced
50
50
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
51
51
52
52
type ClusterTestTypeList struct {
53
- metav1.TypeMeta
54
- metav1.ListMeta
55
- Items []ClusterTestType
53
+ metav1.TypeMeta `json:",inline"`
54
+ metav1.ListMeta `json:"metadata,omitempty"`
55
+ Items []ClusterTestType `json:"items"`
56
56
}
57
57
58
58
// +genclient
@@ -70,5 +70,5 @@ type ClusterTestType struct {
70
70
}
71
71
72
72
type ClusterTestTypeStatus struct {
73
- Blah string
73
+ Blah string `json:"blah"`
74
74
}
Original file line number Diff line number Diff line change @@ -43,16 +43,17 @@ type TestTypeList struct {
43
43
}
44
44
45
45
type TestTypeStatus struct {
46
- Blah string
46
+ Blah string `json:"blah"`
47
47
}
48
48
49
49
// +genclient:nonNamespaced
50
50
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
51
51
52
52
type ClusterTestTypeList struct {
53
- metav1.TypeMeta
54
- metav1.ListMeta
55
- Items []ClusterTestType
53
+ metav1.TypeMeta `json:",inline"`
54
+ // +optional
55
+ metav1.ListMeta `json:"metadata,omitempty"`
56
+ Items []ClusterTestType `json:"items"`
56
57
}
57
58
58
59
// +genclient
@@ -71,5 +72,5 @@ type ClusterTestType struct {
71
72
}
72
73
73
74
type ClusterTestTypeStatus struct {
74
- Blah string
75
+ Blah string `json:"blah"`
75
76
}
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
24
24
// TestType is a top-level type. A client is created for it.
25
25
type TestType struct {
26
26
metav1.TypeMeta
27
+ // +optional
27
28
metav1.ObjectMeta
29
+ // +optional
28
30
Status TestTypeStatus
29
31
}
30
32
@@ -34,6 +36,7 @@ type TestType struct {
34
36
// You are not supposed to create a separated client for this one.
35
37
type TestTypeList struct {
36
38
metav1.TypeMeta
39
+ // +optional
37
40
metav1.ListMeta
38
41
39
42
Items []TestType
Original file line number Diff line number Diff line change @@ -43,5 +43,5 @@ type TestTypeList struct {
43
43
}
44
44
45
45
type TestTypeStatus struct {
46
- Blah string
46
+ Blah string `json:"blah"`
47
47
}
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
24
24
// TestType is a top-level type. A client is created for it.
25
25
type TestType struct {
26
26
metav1.TypeMeta
27
+ // +optional
27
28
metav1.ObjectMeta
29
+ // +optional
28
30
Status TestTypeStatus
29
31
}
30
32
@@ -34,6 +36,7 @@ type TestType struct {
34
36
// You are not supposed to create a separated client for this one.
35
37
type TestTypeList struct {
36
38
metav1.TypeMeta
39
+ // +optional
37
40
metav1.ListMeta
38
41
39
42
Items []TestType
Original file line number Diff line number Diff line change @@ -43,5 +43,5 @@ type TestTypeList struct {
43
43
}
44
44
45
45
type TestTypeStatus struct {
46
- Blah string
46
+ Blah string `json:"blah"`
47
47
}
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21
21
// +genclient
22
22
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
23
23
// +genclient:nonNamespaced
24
+ //
24
25
// TestType is a top-level type. A client is created for it.
25
26
type TestType struct {
26
27
metav1.TypeMeta
Original file line number Diff line number Diff line change @@ -43,5 +43,5 @@ type TestTypeList struct {
43
43
}
44
44
45
45
type TestTypeStatus struct {
46
- Blah string
46
+ Blah string `json:"blah"`
47
47
}
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
24
24
// TestType is a top-level type. A client is created for it.
25
25
type TestType struct {
26
26
metav1.TypeMeta
27
+ // +optional
27
28
metav1.ObjectMeta
29
+ // +optional
28
30
Status TestTypeStatus
29
31
}
30
32
@@ -34,6 +36,7 @@ type TestType struct {
34
36
// You are not supposed to create a separated client for this one.
35
37
type TestTypeList struct {
36
38
metav1.TypeMeta
39
+ // +optional
37
40
metav1.ListMeta
38
41
39
42
Items []TestType
Original file line number Diff line number Diff line change @@ -43,5 +43,5 @@ type TestTypeList struct {
43
43
}
44
44
45
45
type TestTypeStatus struct {
46
- Blah string
46
+ Blah string `json:"blah"`
47
47
}
You can’t perform that action at this time.
0 commit comments