(t *testing.T, path string)
| 15 | } |
| 16 | |
| 17 | func loadSchema(t *testing.T, path string) *gojsonschema.Schema { |
| 18 | t.Helper() |
| 19 | |
| 20 | schemaBytes, err := os.ReadFile(path) |
| 21 | if err != nil { |
| 22 | t.Fatal(err) |
| 23 | } |
| 24 | |
| 25 | loader := gojsonschema.NewStringLoader(string(schemaBytes)) |
| 26 | schema, err := gojsonschema.NewSchema(loader) |
| 27 | if err != nil { |
| 28 | t.Fatalf("invalid schema: %s", err) |
| 29 | } |
| 30 | return schema |
| 31 | } |
| 32 | |
| 33 | func TestJsonSchema(t *testing.T) { |
| 34 | t.Parallel() |