[
https://issues.apache.org/jira/browse/AVRO-2134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
raghugogi updated AVRO-2134:
----------------------------
Description:
We are designing an Avro schema for kafka event payload and trying to use that
for validating event message with Avro schema by posting to Kafka rest proxy.
The avro schema has some fields which are defined with union encoding having
null values
{\"name\": \"address\", \"type\": ,[\"null\",\"string\"], default:null}
Our clients want to send event message data to kafka broker for some complex
data types optionally i.e. without JSON key/value even though it is specified
in Avro schema or few of the primitive data types as optional within complex
data type.
Is there any avro version which can skip the validation for not sent field data
in event message?
The error message we see as follows:
"error_code": 42203,
"message": "Conversion of JSON to Avro failed: Failed to convert JSON to Avro:
Expected start-union. Got END_OBJECT"
was:
We are designing an Avro schema for kafka event payload and trying to use that
for validating event message with Avro schema by posting Kafka rest proxy.
The avro schema has some fields which are defined with union encoding \"},
{\"name\": \"address\", \"type\": ,[\"null\",\"string\"], default:null}
Our clients want to send event message data to kafka broker for some complex
data types optionally even though it is specified in Avro schema or few of the
primitive data types as optional in complex data type.
Is there any avro version which can skip the validation for not sent field data
in event message?
The error message we see as follows:
"error_code": 42203,
"message": "Conversion of JSON to Avro failed: Failed to convert JSON to Avro:
Expected start-union. Got END_OBJECT"
Summary: Cannot define optional field tags in Avro schema (was: Cannot
define optiona field tags in Avro schema)
> Cannot define optional field tags in Avro schema
> ------------------------------------------------
>
> Key: AVRO-2134
> URL: https://issues.apache.org/jira/browse/AVRO-2134
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.7.7
> Reporter: raghugogi
> Priority: Major
>
> We are designing an Avro schema for kafka event payload and trying to use
> that for validating event message with Avro schema by posting to Kafka rest
> proxy.
> The avro schema has some fields which are defined with union encoding having
> null values
> {\"name\": \"address\", \"type\": ,[\"null\",\"string\"], default:null}
> Our clients want to send event message data to kafka broker for some complex
> data types optionally i.e. without JSON key/value even though it is specified
> in Avro schema or few of the primitive data types as optional within complex
> data type.
> Is there any avro version which can skip the validation for not sent field
> data in event message?
> The error message we see as follows:
> "error_code": 42203,
> "message": "Conversion of JSON to Avro failed: Failed to convert JSON to
> Avro: Expected start-union. Got END_OBJECT"
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)