Add +optional tag to all fields with omitempty json tag
This commit is contained in:
@@ -32,7 +32,8 @@ import (
|
||||
// The name of a StorageClass object is significant, and is how users can request a particular class.
|
||||
type StorageClass struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
// provisioner is the driver expected to handle this StorageClass.
|
||||
// This is an optionally-prefixed name, like a label key.
|
||||
@@ -45,6 +46,7 @@ type StorageClass struct {
|
||||
// to the provisioner. The only validation done on keys is that they are
|
||||
// not empty. The maximum number of parameters is
|
||||
// 512, with a cumulative max size of 256K
|
||||
// +optional
|
||||
Parameters map[string]string `json:"parameters,omitempty"`
|
||||
}
|
||||
|
||||
@@ -53,6 +55,7 @@ type StorageClassList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard list metadata
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||
|
||||
// Items is the list of StorageClasses
|
||||
|
@@ -33,6 +33,7 @@ type StorageClass struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Provisioner indicates the type of the provisioner.
|
||||
@@ -40,6 +41,7 @@ type StorageClass struct {
|
||||
|
||||
// Parameters holds the parameters for the provisioner that should
|
||||
// create volumes of this storage class.
|
||||
// +optional
|
||||
Parameters map[string]string `json:"parameters,omitempty" protobuf:"bytes,3,rep,name=parameters"`
|
||||
}
|
||||
|
||||
@@ -48,6 +50,7 @@ type StorageClassList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard list metadata
|
||||
// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
|
||||
// +optional
|
||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is the list of StorageClasses
|
||||
|
Reference in New Issue
Block a user