Skip to content

Commit

Permalink
fix(semgent): add missing omitempty
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienaury committed Jan 22, 2025
1 parent ac27e60 commit 8a3cf21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pkg/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 2 additions & 4 deletions schema/v1/pimo.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -955,8 +955,7 @@
"additionalProperties": false,
"type": "object",
"required": [
"name",
"then"
"name"
]
},
"PipeType": {
Expand Down Expand Up @@ -1101,8 +1100,7 @@
"type": "object",
"required": [
"regex",
"match",
"nomatch"
"match"
]
},
"SelectorType": {
Expand Down

0 comments on commit 8a3cf21

Please sign in to comment.