Update github.com/santhosh-tekuri/jsonschema to v6

What does this MR do?

Update github.com/santhosh-tekuri/jsonschema to v6 .

  • init(): Replaced MustCompileString("config_schema.json", string(schema)) with the v6 pattern:
    • UnmarshalJSON(bytes.NewReader(schema)) — parse the schema bytes into a JSON value
    • NewCompiler() + AddResource(url, doc) + MustCompile(url) — compile the schema
  • validate(): Replaced json.Unmarshal into interface{} with UnmarshalJSON(bytes.NewReader(configString)), which is the v6-idiomatic way to prepare an instance for validation.

The core reason for these changes: v6 removed MustCompileString and now requires all JSON documents (both schemas and instances) to be parsed via jsonschema_validator.UnmarshalJSON rather than Go's standard encoding/json, as v6 uses its own JSON representation internally.

Why was this MR needed?

Addresses !6465 (comment 3132270250)

What's the best way to test this MR?

What are the relevant issue numbers?

Edited by Vishal Tak

Merge request reports

Loading