Fix json serialization consistency

This commit is contained in:
derekwaynecarr
2014-10-30 13:05:40 -04:00
parent 6492d35d16
commit 56b6273dfb
3 changed files with 21 additions and 21 deletions

View File

@@ -363,7 +363,7 @@ type PodState struct {
// PodList is a list of Pods.
type PodList struct {
TypeMeta `json:",inline" yaml:",inline"`
Items []Pod `json:"items" yaml:"items,omitempty"`
Items []Pod `json:"items" yaml:"items"`
}
// Pod is a collection of containers, used as either input (create, update) or as output (list, get).
@@ -386,7 +386,7 @@ type ReplicationControllerState struct {
// ReplicationControllerList is a collection of replication controllers.
type ReplicationControllerList struct {
TypeMeta `json:",inline" yaml:",inline"`
Items []ReplicationController `json:"items,omitempty" yaml:"items,omitempty"`
Items []ReplicationController `json:"items" yaml:"items"`
}
// ReplicationController represents the configuration of a replication controller.
@@ -450,7 +450,7 @@ type Endpoints struct {
// EndpointsList is a list of endpoints.
type EndpointsList struct {
TypeMeta `json:",inline" yaml:",inline"`
Items []Endpoints `json:"items,omitempty" yaml:"items,omitempty"`
Items []Endpoints `json:"items" yaml:"items"`
}
// NodeResources represents resources on a Kubernetes system node
@@ -479,7 +479,7 @@ type Minion struct {
// MinionList is a list of minions.
type MinionList struct {
TypeMeta `json:",inline" yaml:",inline"`
Items []Minion `json:"items,omitempty" yaml:"items,omitempty"`
Items []Minion `json:"items" yaml:"items"`
}
// Binding is written by a scheduler to cause a pod to be bound to a host.
@@ -651,7 +651,7 @@ type ServerOp struct {
// ServerOpList is a list of operations, as delivered to API clients.
type ServerOpList struct {
TypeMeta `yaml:",inline" json:",inline"`
Items []ServerOp `yaml:"items,omitempty" json:"items,omitempty"`
Items []ServerOp `yaml:"items" json:"items"`
}
// ObjectReference contains enough information to let you inspect or modify the referred object.
@@ -711,7 +711,7 @@ type Event struct {
// EventList is a list of events.
type EventList struct {
TypeMeta `yaml:",inline" json:",inline"`
Items []Event `yaml:"items,omitempty" json:"items,omitempty"`
Items []Event `yaml:"items" json:"items"`
}
// ContainerManifest corresponds to the Container Manifest format, documented at:
@@ -737,7 +737,7 @@ type ContainerManifest struct {
// DEPRECATED: Replaced with BoundPods
type ContainerManifestList struct {
TypeMeta `json:",inline" yaml:",inline"`
Items []ContainerManifest `json:"items,omitempty" yaml:"items,omitempty"`
Items []ContainerManifest `json:"items" yaml:"items,omitempty"`
}
// Backported from v1beta3 to replace ContainerManifest