mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 15:05:20 +00:00
Add +optional tag to all fields with omitempty json tag
This commit is contained in:
@@ -26,7 +26,8 @@ import (
|
||||
// TODO: enable meta-only decoding for protobuf.
|
||||
type MetadataOnlyObject struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
v1.ObjectMeta `json:"metadata,omitempty"`
|
||||
// +optional
|
||||
v1.ObjectMeta `json:"metadata,omitempty"`
|
||||
}
|
||||
|
||||
// MetadataOnlyObjectList allows decoding from JSON data only the typemeta and metadata of
|
||||
@@ -34,6 +35,7 @@ type MetadataOnlyObject struct {
|
||||
// TODO: enable meta-only decoding for protobuf.
|
||||
type MetadataOnlyObjectList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||
|
||||
Items []MetadataOnlyObject `json:"items"`
|
||||
|
||||
Reference in New Issue
Block a user