pub fn validate_raw_avro_schema(json_schema: &Vec<u8>) -> Result<(), AvroError>
Expand description

Function to validate incoming json serialized schema against avro schema.

Examples

use common_helpers::avro;
use common_helpers::types::*;
let raw_schema = r#"
{
   "type": "record",
  "name": "test",
 "fields": [
   {"name": "a", "type": "long", "default": 42},
  {"name": "b", "type": "string"}
]
}
"#;
let schema_fingerprint = avro::fingerprint_raw_schema(raw_schema);
assert!(schema_fingerprint.is_ok());