Skip to content

Commit

Permalink
Added omitempty JSON tag
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelawyu committed Oct 31, 2022
1 parent 2a56504 commit 0e0efe7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/v1alpha1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type ExportedObjectReference struct {
// The timestamp from a local clock when the generation of the object is exported.
// This field is marked as optional for backwards compatibility reasons.
// +kubebuilder:validation:Optional
ExportedSince metav1.Time `json:"exportedSince"`
ExportedSince metav1.Time `json:"exportedSince,omitempty"`
}

// FromMetaObjects builds a new ExportedObjectReference using TypeMeta and ObjectMeta fields from an object.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
exportedSince:
description: The timestamp from a local clock when the generation
of the object is exported. This field is marked as optional
for compatibility reasons.
for backwards compatibility reasons.
format: date-time
type: string
generation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
exportedSince:
description: The timestamp from a local clock when the generation
of the object is exported. This field is marked as optional
for compatibility reasons.
for backwards compatibility reasons.
format: date-time
type: string
generation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ spec:
exportedSince:
description: The timestamp from a local clock when the generation
of the object is exported. This field is marked as optional
for compatibility reasons.
for backwards compatibility reasons.
format: date-time
type: string
generation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ spec:
exportedSince:
description: The timestamp from a local clock when the generation
of the object is exported. This field is marked as optional
for compatibility reasons.
for backwards compatibility reasons.
format: date-time
type: string
generation:
Expand Down

0 comments on commit 0e0efe7

Please sign in to comment.