diff --git a/staging/src/k8s.io/code-generator/examples/HyphenGroup/apis/example/v1/types.go b/staging/src/k8s.io/code-generator/examples/HyphenGroup/apis/example/v1/types.go index 3c97c319ca1..b8c7f823301 100644 --- a/staging/src/k8s.io/code-generator/examples/HyphenGroup/apis/example/v1/types.go +++ b/staging/src/k8s.io/code-generator/examples/HyphenGroup/apis/example/v1/types.go @@ -43,16 +43,16 @@ type TestTypeList struct { } type TestTypeStatus struct { - Blah string + Blah string `json:"blah"` } // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type ClusterTestTypeList struct { - metav1.TypeMeta - metav1.ListMeta - Items []ClusterTestType + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterTestType `json:"items"` } // +genclient @@ -70,5 +70,5 @@ type ClusterTestType struct { } type ClusterTestTypeStatus struct { - Blah string + Blah string `json:"blah"` } diff --git a/staging/src/k8s.io/code-generator/examples/MixedCase/apis/example/v1/types.go b/staging/src/k8s.io/code-generator/examples/MixedCase/apis/example/v1/types.go index 3eb7669d3fc..f74e27cee0d 100644 --- a/staging/src/k8s.io/code-generator/examples/MixedCase/apis/example/v1/types.go +++ b/staging/src/k8s.io/code-generator/examples/MixedCase/apis/example/v1/types.go @@ -43,16 +43,17 @@ type TestTypeList struct { } type TestTypeStatus struct { - Blah string + Blah string `json:"blah"` } // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type ClusterTestTypeList struct { - metav1.TypeMeta - metav1.ListMeta - Items []ClusterTestType + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterTestType `json:"items"` } // +genclient @@ -71,5 +72,5 @@ type ClusterTestType struct { } type ClusterTestTypeStatus struct { - Blah string + Blah string `json:"blah"` } diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/apis/core/types.go b/staging/src/k8s.io/code-generator/examples/apiserver/apis/core/types.go index bd725cd6ca5..9ad4579cd31 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/apis/core/types.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/apis/core/types.go @@ -24,7 +24,9 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // TestType is a top-level type. A client is created for it. type TestType struct { metav1.TypeMeta + // +optional metav1.ObjectMeta + // +optional Status TestTypeStatus } @@ -34,6 +36,7 @@ type TestType struct { // You are not supposed to create a separated client for this one. type TestTypeList struct { metav1.TypeMeta + // +optional metav1.ListMeta Items []TestType diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/apis/core/v1/types.go b/staging/src/k8s.io/code-generator/examples/apiserver/apis/core/v1/types.go index 819ad21a5f8..5a9c0b9a7bd 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/apis/core/v1/types.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/apis/core/v1/types.go @@ -43,5 +43,5 @@ type TestTypeList struct { } type TestTypeStatus struct { - Blah string + Blah string `json:"blah"` } diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/apis/example/types.go b/staging/src/k8s.io/code-generator/examples/apiserver/apis/example/types.go index b4fc976684f..8f3dbb55375 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/apis/example/types.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/apis/example/types.go @@ -24,7 +24,9 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // TestType is a top-level type. A client is created for it. type TestType struct { metav1.TypeMeta + // +optional metav1.ObjectMeta + // +optional Status TestTypeStatus } @@ -34,6 +36,7 @@ type TestType struct { // You are not supposed to create a separated client for this one. type TestTypeList struct { metav1.TypeMeta + // +optional metav1.ListMeta Items []TestType diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/apis/example/v1/types.go b/staging/src/k8s.io/code-generator/examples/apiserver/apis/example/v1/types.go index 5c2ebc4d6f4..24a1a348c35 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/apis/example/v1/types.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/apis/example/v1/types.go @@ -43,5 +43,5 @@ type TestTypeList struct { } type TestTypeStatus struct { - Blah string + Blah string `json:"blah"` } diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/apis/example2/types.go b/staging/src/k8s.io/code-generator/examples/apiserver/apis/example2/types.go index a23ee09185c..3bdcf2a9a4b 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/apis/example2/types.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/apis/example2/types.go @@ -21,6 +21,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +genclient:nonNamespaced +// // TestType is a top-level type. A client is created for it. type TestType struct { metav1.TypeMeta diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/apis/example2/v1/types.go b/staging/src/k8s.io/code-generator/examples/apiserver/apis/example2/v1/types.go index 5c2ebc4d6f4..24a1a348c35 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/apis/example2/v1/types.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/apis/example2/v1/types.go @@ -43,5 +43,5 @@ type TestTypeList struct { } type TestTypeStatus struct { - Blah string + Blah string `json:"blah"` } diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/apis/example3.io/types.go b/staging/src/k8s.io/code-generator/examples/apiserver/apis/example3.io/types.go index 0c49b45f367..a020b0af534 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/apis/example3.io/types.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/apis/example3.io/types.go @@ -24,7 +24,9 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // TestType is a top-level type. A client is created for it. type TestType struct { metav1.TypeMeta + // +optional metav1.ObjectMeta + // +optional Status TestTypeStatus } @@ -34,6 +36,7 @@ type TestType struct { // You are not supposed to create a separated client for this one. type TestTypeList struct { metav1.TypeMeta + // +optional metav1.ListMeta Items []TestType diff --git a/staging/src/k8s.io/code-generator/examples/apiserver/apis/example3.io/v1/types.go b/staging/src/k8s.io/code-generator/examples/apiserver/apis/example3.io/v1/types.go index 5c2ebc4d6f4..24a1a348c35 100644 --- a/staging/src/k8s.io/code-generator/examples/apiserver/apis/example3.io/v1/types.go +++ b/staging/src/k8s.io/code-generator/examples/apiserver/apis/example3.io/v1/types.go @@ -43,5 +43,5 @@ type TestTypeList struct { } type TestTypeStatus struct { - Blah string + Blah string `json:"blah"` } diff --git a/staging/src/k8s.io/code-generator/examples/crd/apis/example/v1/types.go b/staging/src/k8s.io/code-generator/examples/crd/apis/example/v1/types.go index d92582569c7..0fc1edb41c9 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/apis/example/v1/types.go +++ b/staging/src/k8s.io/code-generator/examples/crd/apis/example/v1/types.go @@ -44,16 +44,18 @@ type TestTypeList struct { } type TestTypeStatus struct { - Blah string + Blah string `json:"blah"` } // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type ClusterTestTypeList struct { - metav1.TypeMeta - metav1.ListMeta - Items []ClusterTestType + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + + Items []ClusterTestType `json:"items"` } // +genclient @@ -71,5 +73,5 @@ type ClusterTestType struct { } type ClusterTestTypeStatus struct { - Blah string + Blah string `json:"blah"` } diff --git a/staging/src/k8s.io/code-generator/examples/crd/apis/example2/v1/types.go b/staging/src/k8s.io/code-generator/examples/crd/apis/example2/v1/types.go index 5c2ebc4d6f4..24a1a348c35 100644 --- a/staging/src/k8s.io/code-generator/examples/crd/apis/example2/v1/types.go +++ b/staging/src/k8s.io/code-generator/examples/crd/apis/example2/v1/types.go @@ -43,5 +43,5 @@ type TestTypeList struct { } type TestTypeStatus struct { - Blah string + Blah string `json:"blah"` } diff --git a/staging/src/k8s.io/code-generator/examples/single/api/v1/types.go b/staging/src/k8s.io/code-generator/examples/single/api/v1/types.go index 8543ad26c26..f1bd68f4981 100644 --- a/staging/src/k8s.io/code-generator/examples/single/api/v1/types.go +++ b/staging/src/k8s.io/code-generator/examples/single/api/v1/types.go @@ -43,16 +43,17 @@ type TestTypeList struct { } type TestTypeStatus struct { - Blah string + Blah string `json:"blah"` } // +genclient:nonNamespaced // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type ClusterTestTypeList struct { - metav1.TypeMeta - metav1.ListMeta - Items []ClusterTestType + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty"` + Items []ClusterTestType `json:"items"` } // +genclient @@ -70,5 +71,5 @@ type ClusterTestType struct { } type ClusterTestTypeStatus struct { - Blah string + Blah string `json:"blah"` }