diff --git a/pkg/model/model.go b/pkg/model/model.go index d7a4847a..7e8fbb99 100755 --- a/pkg/model/model.go +++ b/pkg/model/model.go @@ -244,13 +244,13 @@ type ApplyType struct { type PartitionType struct { Name string `yaml:"name" json:"name" jsonschema_description:"name of the partition"` When string `yaml:"when,omitempty" json:"when,omitempty" jsonschema_description:"template to execute, if true the condition is active"` - Then []MaskType `yaml:"then" json:"then" jsonschema_description:"list of masks to execute if the condition is active"` + Then []MaskType `yaml:"then,omitempty" json:"then,omitempty" jsonschema_description:"list of masks to execute if the condition is active"` } type SegmentType struct { Regex string `yaml:"regex" json:"regex" jsonschema_description:"regex used to create segments using group captures, groups must be named"` Match map[string][]MaskType `yaml:"match" json:"match" jsonschema_description:"list of masks to execute for each group if the regex matched"` - NoMatch []MaskType `yaml:"nomatch" json:"nomatch" jsonschema_description:"list of masks to execute for each group if the regex did not match"` + NoMatch []MaskType `yaml:"nomatch,omitempty" json:"nomatch,omitempty" jsonschema_description:"list of masks to execute for each group if the regex did not match"` } type LogType struct { diff --git a/schema/v1/pimo.schema.json b/schema/v1/pimo.schema.json index ac8e52cd..36a33a39 100644 --- a/schema/v1/pimo.schema.json +++ b/schema/v1/pimo.schema.json @@ -955,8 +955,7 @@ "additionalProperties": false, "type": "object", "required": [ - "name", - "then" + "name" ] }, "PipeType": { @@ -1101,8 +1100,7 @@ "type": "object", "required": [ "regex", - "match", - "nomatch" + "match" ] }, "SelectorType": {