Skip to content

Commit

Permalink
fixup! Fix default value setter in jsonschema generation
Browse files Browse the repository at this point in the history
  • Loading branch information
karimkhaleel committed Oct 29, 2023
1 parent 86e2c73 commit 0ea5a6a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/config/user_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@ type GitConfig struct {

type PagerType string

func (PagerType) JSONSchemaExtend(schema *jsonschema.Schema) {
schema.Examples = []any{
"delta --dark --paging=never",
"diff-so-fancy",
"ydiff -p cat -s --wrap --width={{columnWidth}}",
}
}

type PagingConfig struct {
// Value of the --color arg in the git diff command. Some pagers want this to be set to 'always' and some want it set to 'never'
ColorArg string `yaml:"colorArg" jsonschema:"enum=always,enum=never"`
Expand All @@ -221,14 +229,6 @@ type PagingConfig struct {
ExternalDiffCommand string `yaml:"externalDiffCommand"`
}

func (PagerType) JSONSchemaExtend(schema *jsonschema.Schema) {
schema.Examples = []any{
"delta --dark --paging=never",
"diff-so-fancy",
"ydiff -p cat -s --wrap --width={{columnWidth}}",
}
}

type CommitConfig struct {
// If true, pass '--signoff' flag when committing
SignOff bool `yaml:"signOff"`
Expand Down

0 comments on commit 0ea5a6a

Please sign in to comment.