Skip to content

Commit 8a3cf21

Browse files
committed
fix(semgent): add missing omitempty
1 parent ac27e60 commit 8a3cf21

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

pkg/model/model.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,13 @@ type ApplyType struct {
244244
type PartitionType struct {
245245
Name string `yaml:"name" json:"name" jsonschema_description:"name of the partition"`
246246
When string `yaml:"when,omitempty" json:"when,omitempty" jsonschema_description:"template to execute, if true the condition is active"`
247-
Then []MaskType `yaml:"then" json:"then" jsonschema_description:"list of masks to execute if the condition is active"`
247+
Then []MaskType `yaml:"then,omitempty" json:"then,omitempty" jsonschema_description:"list of masks to execute if the condition is active"`
248248
}
249249

250250
type SegmentType struct {
251251
Regex string `yaml:"regex" json:"regex" jsonschema_description:"regex used to create segments using group captures, groups must be named"`
252252
Match map[string][]MaskType `yaml:"match" json:"match" jsonschema_description:"list of masks to execute for each group if the regex matched"`
253-
NoMatch []MaskType `yaml:"nomatch" json:"nomatch" jsonschema_description:"list of masks to execute for each group if the regex did not match"`
253+
NoMatch []MaskType `yaml:"nomatch,omitempty" json:"nomatch,omitempty" jsonschema_description:"list of masks to execute for each group if the regex did not match"`
254254
}
255255

256256
type LogType struct {

schema/v1/pimo.schema.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -955,8 +955,7 @@
955955
"additionalProperties": false,
956956
"type": "object",
957957
"required": [
958-
"name",
959-
"then"
958+
"name"
960959
]
961960
},
962961
"PipeType": {
@@ -1101,8 +1100,7 @@
11011100
"type": "object",
11021101
"required": [
11031102
"regex",
1104-
"match",
1105-
"nomatch"
1103+
"match"
11061104
]
11071105
},
11081106
"SelectorType": {

0 commit comments

Comments
 (0)