mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
code-generator/examples: fix json tags
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
This commit is contained in:
parent
be2cf7e4d9
commit
676d989713
@ -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"`
|
||||
}
|
||||
|
@ -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"`
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -43,5 +43,5 @@ type TestTypeList struct {
|
||||
}
|
||||
|
||||
type TestTypeStatus struct {
|
||||
Blah string
|
||||
Blah string `json:"blah"`
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -43,5 +43,5 @@ type TestTypeList struct {
|
||||
}
|
||||
|
||||
type TestTypeStatus struct {
|
||||
Blah string
|
||||
Blah string `json:"blah"`
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -43,5 +43,5 @@ type TestTypeList struct {
|
||||
}
|
||||
|
||||
type TestTypeStatus struct {
|
||||
Blah string
|
||||
Blah string `json:"blah"`
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -43,5 +43,5 @@ type TestTypeList struct {
|
||||
}
|
||||
|
||||
type TestTypeStatus struct {
|
||||
Blah string
|
||||
Blah string `json:"blah"`
|
||||
}
|
||||
|
@ -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"`
|
||||
}
|
||||
|
@ -43,5 +43,5 @@ type TestTypeList struct {
|
||||
}
|
||||
|
||||
type TestTypeStatus struct {
|
||||
Blah string
|
||||
Blah string `json:"blah"`
|
||||
}
|
||||
|
@ -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"`
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user