Beispiel #1
0
func minItemsError(param *spec.Parameter) *errors.Validation {
	return errors.TooFewItems(param.Name, param.In, *param.MinItems)
}
Beispiel #2
0
// MinItems validates that there are at least n items in a slice
func MinItems(path, in string, size, min int64) *errors.Validation {
	if size < min {
		return errors.TooFewItems(path, in, min)
	}
	return nil
}
Beispiel #3
0
func minItemsErrorItems(path, in string, items *spec.Items) *errors.Validation {
	return errors.TooFewItems(path, in, *items.MinItems)
}