Add +optional tag to all fields with omitempty json tag
This commit is contained in:
@@ -29,12 +29,15 @@ type TestType struct {
|
||||
// the next tag removes the field from openapi spec. Adding unversioned objectMeta bring in a whole set of
|
||||
// unversioned objects in the generate file that is not used anywhere other than this test type.
|
||||
// +k8s:openapi-gen=false
|
||||
// +optional
|
||||
api.ObjectMeta `json:"metadata,omitempty"`
|
||||
// +optional
|
||||
Status TestTypeStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
type TestTypeList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
unversioned.ListMeta `json:"metadata,omitempty"`
|
||||
|
||||
Items []TestType `json:"items"`
|
||||
|
Reference in New Issue
Block a user