From ed745e33ebcec8af02c9dbdc8ac021e6f9dd368c Mon Sep 17 00:00:00 2001 From: Shai Nagar Date: Sat, 22 May 2021 12:45:27 +0300 Subject: [PATCH] improved config validation --- api/spec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/spec.go b/api/spec.go index 116de4b..8b1b371 100644 --- a/api/spec.go +++ b/api/spec.go @@ -20,7 +20,7 @@ type ScenarioSpec struct { // BenchmarkSpec benchmark specs top level structure type BenchmarkSpec struct { - Scenarios []*ScenarioSpec `json:"scenarios" yaml:"scenarios" validate:"required,dive"` + Scenarios []*ScenarioSpec `json:"scenarios" yaml:"scenarios" validate:"required,min=1,dive"` Executions int `validate:"required,gte=1"` Alternate bool }