JSON Payload:
{
"BILLING_EVENT_RULE_MET_DT": "lsks",
"PlanType":"hhh"
}
AVRO Schema:
{
"name": "Subscription",
"type":"record",
"doc": "Subscription details",
"fields":
[
{ "name": "BILLING_EVENT_RULE_MET_DT", "type":[ "null","string"],"default": null },
{"name": "PlanType",
"type":
{
"name":"PlanType",
"type": "fixed",
"size": 4
}
}
]
}
ERROR:
The value [hhh] for field [PlanType] should be [FixedType <size: 4, name: PlanType, namespace: None, aliases: None>].
While validating its giving me the following error, what I am supposed to write in the json payload for PlanType field? Actually this all I am exploring as I want to define the maxlength and minlength for a field in AVRO schema similar to XML schema.