MCPcopy Create free account
hub / github.com/dropbox/dbxcli / assertJSONBytesValidateAgainstSchema

Function assertJSONBytesValidateAgainstSchema

cmd/json_command_schema_test.go:369–376  ·  view source on GitHub ↗
(t *testing.T, schema *jsonschema.Schema, data []byte)

Source from the content-addressed store, hash-verified

367}
368
369func assertJSONBytesValidateAgainstSchema(t *testing.T, schema *jsonschema.Schema, data []byte) {
370 t.Helper()
371
372 value := decodeJSONValueForSchema(t, data)
373 if err := schema.Validate(value); err != nil {
374 t.Fatalf("JSON output does not validate against public schema: %v\noutput: %s", err, string(data))
375 }
376}
377
378func writeJSONSchemaTempFile(t *testing.T, name, content string) string {
379 t.Helper()

Calls 1

decodeJSONValueForSchemaFunction · 0.85

Tested by

no test coverage detected