Skip to content

Commit

Permalink
fix(jsonschema): add $schema property (#942)
Browse files Browse the repository at this point in the history
  • Loading branch information
mst-mkt authored Feb 21, 2025
1 parent 6ad8b52 commit a4ae15c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/gen/jsonschema.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ func main() {
r.AdditionalFields = func(t reflect.Type) []reflect.StructField {
if t == reflect.TypeOf(config.Config{}) {
return reflect.VisibleFields(reflect.TypeOf(struct {
Schema string `json:"$schema,omitempty"`
PreCommit *config.Hook `json:"pre-commit,omitempty"`
ApplypatchMsg *config.Hook `json:"applypatch-msg,omitempty"`
PreApplypatch *config.Hook `json:"pre-applypatch,omitempty"`
Expand Down
5 changes: 4 additions & 1 deletion schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@
"type": "object"
}
},
"$comment": "Last updated on 2025.01.21.",
"$comment": "Last updated on 2025.01.31.",
"properties": {
"min_version": {
"type": "string",
Expand Down Expand Up @@ -504,6 +504,9 @@
"$ref": "#/$defs/Remote",
"description": "Deprecated: use remotes"
},
"$schema": {
"type": "string"
},
"pre-commit": {
"$ref": "#/$defs/Hook"
},
Expand Down

0 comments on commit a4ae15c

Please sign in to comment.