Skip to content

Commit

Permalink
fix: Enable format assertion for JSON schema
Browse files Browse the repository at this point in the history
  • Loading branch information
candiduslynx authored Sep 20, 2023
1 parent 7a6206c commit d583350
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func NewPlugin(name string, version string, newClient NewClientFunc, options ...
if p.schema != "" {
c := jsonschema.NewCompiler()
c.Draft = jsonschema.Draft2020
c.AssertFormat = true
if err := c.AddResource("schema.json", strings.NewReader(p.schema)); err != nil {
panic(fmt.Errorf("failed add plugin JSONSchema: %w", err))
}
Expand Down

0 comments on commit d583350

Please sign in to comment.