diff --git a/internal/acl/config.go b/internal/acl/config.go index aff37289..d25ba8d6 100644 --- a/internal/acl/config.go +++ b/internal/acl/config.go @@ -26,9 +26,9 @@ type Config struct { Log *accesslog.ACLLoggerConfig `json:"log"` Notify struct { - To []string `json:"to"` // list of notification providers - Interval time.Duration `json:"interval"` // interval between notifications - IncludeAllowed *bool `json:"include_allowed"` // default: false + To []string `json:"to,omitempty"` // list of notification providers + Interval time.Duration `json:"interval,omitempty"` // interval between notifications + IncludeAllowed *bool `json:"include_allowed,omitzero"` // default: false } `json:"notify"` config diff --git a/internal/logging/accesslog/config.go b/internal/logging/accesslog/config.go index f27a51e0..1200ba2f 100644 --- a/internal/logging/accesslog/config.go +++ b/internal/logging/accesslog/config.go @@ -10,7 +10,7 @@ import ( type ( ConfigBase struct { - Path string `json:"path"` + Path string `json:"path,omitempty"` Stdout bool `json:"stdout"` Retention *Retention `json:"retention" aliases:"keep"` RotateInterval time.Duration `json:"rotate_interval,omitempty" swaggertype:"primitive,integer"` diff --git a/internal/logging/accesslog/retention.go b/internal/logging/accesslog/retention.go index 1658c021..a67cf953 100644 --- a/internal/logging/accesslog/retention.go +++ b/internal/logging/accesslog/retention.go @@ -9,9 +9,9 @@ import ( ) type Retention struct { - Days uint64 `json:"days"` - Last uint64 `json:"last"` - KeepSize uint64 `json:"keep_size"` + Days uint64 `json:"days,omitempty"` + Last uint64 `json:"last,omitempty"` + KeepSize uint64 `json:"keep_size,omitempty"` } // @name LogRetention var (