Add +optional tag to all fields with omitempty json tag

This commit is contained in:
mbohlool
2016-10-14 15:37:37 -07:00
parent f85d8f2e66
commit 25afcc5522
43 changed files with 1665 additions and 133 deletions

View File

@@ -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"`