diff --git a/vendor.conf b/vendor.conf index c410519e..4366f6fc 100644 --- a/vendor.conf +++ b/vendor.conf @@ -5,4 +5,4 @@ k8s.io/kubernetes v1.8.3 bitbucket.org/ww/goautoneg a547fc61f48d567d5b4ec6f8aee5573d8efce11d https://github.com/rancher/goautoneg.git golang.org/x/sync fd80eb99c8f653c847d294a001bdf2a3a6f768f5 -github.com/rancher/norman 35fb4dfb92cdc8e0391504f83bbe0cdc97b03686 +github.com/rancher/norman 41c044bb256b54652f7fae51fde7c45cb6c4ccb9 diff --git a/vendor/github.com/rancher/norman/types/reflection.go b/vendor/github.com/rancher/norman/types/reflection.go index ef3f123e..1935ab7a 100644 --- a/vendor/github.com/rancher/norman/types/reflection.go +++ b/vendor/github.com/rancher/norman/types/reflection.go @@ -270,6 +270,11 @@ func (s *Schemas) readFields(schema *Schema, t reflect.Type) error { } else if fieldType.Kind() == reflect.Bool { schemaField.Nullable = false schemaField.Default = false + } else if fieldType.Kind() == reflect.Int || + fieldType.Kind() == reflect.Int32 || + fieldType.Kind() == reflect.Int64 { + schemaField.Nullable = false + schemaField.Default = 0 } if err := applyTag(&field, &schemaField); err != nil {