From 03d9d853e8b5c7c7192cacd4361b1f69c8dccf78 Mon Sep 17 00:00:00 2001 From: Rohan Singh Date: Thu, 25 Apr 2024 17:11:29 -0400 Subject: [PATCH] schema: Remove `dive` tag on SchemaField.Visibility This tag only makes sense on slices and maps. It causes a panic in `go-playground/validator` v10.19.0. --- schema/schema.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/schema.go b/schema/schema.go index 63527edf30..122cd46c2d 100644 --- a/schema/schema.go +++ b/schema/schema.go @@ -42,7 +42,7 @@ type SchemaField struct { Visibility *SchemaVisibility `json:"visibility,omitempty" validate:"omitempty,dive"` Default string `json:"default,omitempty" validate:"required_for=dropdown onoff radio"` - Options []SchemaOption `json:"options,omitempty" validate:"required_for=dropdown radio,dive"` + Options []SchemaOption `json:"options,omitempty" validate:"required_for=dropdown radio"` Palette []string `json:"palette,omitempty"` Source string `json:"source,omitempty" validate:"required_for=generated"`