Skip to content

Commit

Permalink
fix: wrong validation on paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessio Pragliola authored and omissis committed Sep 11, 2023
1 parent b47a332 commit 512fad5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ type MiddlewareConfig[T any] struct {
}

type BodyFilterConfig struct {
Paths []BodyFilterConfigPaths `validate:"required,gt=0,dive,gt=0" yaml:"paths"`
Paths []BodyFilterConfigPaths `validate:"required,gt=0,dive" yaml:"paths"`
Methods []string `validate:"required,gt=0,dive,gt=0,uppercase" yaml:"methods"`
Filter string `validate:"required" yaml:"filter"`
}

type BodyFilterConfigPaths struct {
Path string `yaml:"path"`
Path string `validate:"required" yaml:"path"`
Type string `validate:"oneof=glob prefix" yaml:"type"`
}

0 comments on commit 512fad5

Please sign in to comment.