Skip to content

Commit

Permalink
schema: Remove dive tag on SchemaField.Visibility (#1058)
Browse files Browse the repository at this point in the history
This tag only makes sense on slices and maps. It causes a panic
in `go-playground/validator` v10.19.0.
  • Loading branch information
rohansingh authored Apr 25, 2024
1 parent ff7ac7c commit 186eba9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit 186eba9

Please sign in to comment.