bump kube-openapi
This commit is contained in:
2
vendor/k8s.io/kube-openapi/pkg/validation/errors/doc.go
generated
vendored
2
vendor/k8s.io/kube-openapi/pkg/validation/errors/doc.go
generated
vendored
@@ -13,7 +13,6 @@
|
||||
// limitations under the License.
|
||||
|
||||
/*
|
||||
|
||||
Package errors provides an Error interface and several concrete types
|
||||
implementing this interface to manage API errors and JSON-schema validation
|
||||
errors.
|
||||
@@ -23,6 +22,5 @@ it defines.
|
||||
|
||||
It is used throughout the various go-openapi toolkit libraries
|
||||
(https://github.com/go-openapi).
|
||||
|
||||
*/
|
||||
package errors
|
||||
|
4
vendor/k8s.io/kube-openapi/pkg/validation/spec/paths.go
generated
vendored
4
vendor/k8s.io/kube-openapi/pkg/validation/spec/paths.go
generated
vendored
@@ -114,7 +114,9 @@ func (p *Paths) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Deco
|
||||
p.Paths[k] = pi
|
||||
default:
|
||||
_, err := dec.ReadValue() // skip value
|
||||
return err
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
default:
|
||||
|
8
vendor/k8s.io/kube-openapi/pkg/validation/validate/values.go
generated
vendored
8
vendor/k8s.io/kube-openapi/pkg/validation/validate/values.go
generated
vendored
@@ -184,7 +184,7 @@ func MinimumUint(path, in string, data, min uint64, exclusive bool) *errors.Vali
|
||||
// MultipleOf validates if the provided number is a multiple of the factor
|
||||
func MultipleOf(path, in string, data, factor float64) *errors.Validation {
|
||||
// multipleOf factor must be positive
|
||||
if factor < 0 {
|
||||
if factor <= 0 {
|
||||
return errors.MultipleOfMustBePositive(path, in, factor)
|
||||
}
|
||||
var mult float64
|
||||
@@ -202,7 +202,7 @@ func MultipleOf(path, in string, data, factor float64) *errors.Validation {
|
||||
// MultipleOfInt validates if the provided integer is a multiple of the factor
|
||||
func MultipleOfInt(path, in string, data int64, factor int64) *errors.Validation {
|
||||
// multipleOf factor must be positive
|
||||
if factor < 0 {
|
||||
if factor <= 0 {
|
||||
return errors.MultipleOfMustBePositive(path, in, factor)
|
||||
}
|
||||
mult := data / factor
|
||||
@@ -214,6 +214,10 @@ func MultipleOfInt(path, in string, data int64, factor int64) *errors.Validation
|
||||
|
||||
// MultipleOfUint validates if the provided unsigned integer is a multiple of the factor
|
||||
func MultipleOfUint(path, in string, data, factor uint64) *errors.Validation {
|
||||
// multipleOf factor must be positive
|
||||
if factor == 0 {
|
||||
return errors.MultipleOfMustBePositive(path, in, factor)
|
||||
}
|
||||
mult := data / factor
|
||||
if mult*factor != data {
|
||||
return errors.NotMultipleOf(path, in, factor, data)
|
||||
|
Reference in New Issue
Block a user