You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Successfully encoded and decoded data. However, just to see if the validation is working, we
created data like {fullName: "ABC", dept: "CS", age: 24} ... we expected it to give error when encoding this data.
But it encoded the data and when we decoded we got fullName field ... not the two other data fields.
How can we enforce it to give error that this data is not as per the schema created above and has new data fields?
Thanks a lot !
The text was updated successfully, but these errors were encountered:
I just hit this, too. The validation is kind of half-baked.
If I send an invalid value for an enum, it catches that.
If I omit a required field, it catches that.
If I send the wrong type for a field, it catches that.
If I have a typo in an optional field's name, it silently discards it and keeps walking. 😞
Did you guys ever figure it out im trying to do the same thing and I don't see anything online lol. I want to take the messages that don't follow the schema and put them into a dead message queue that I created .
Hi,
We followed the example and created schema as
const schema = `
{
"type": "record",
"name": "RandomTest",
"namespace": "examples",
"fields": [{ "type": "string", "name": "fullName" }]
}
Successfully encoded and decoded data. However, just to see if the validation is working, we
created data like {fullName: "ABC", dept: "CS", age: 24} ... we expected it to give error when encoding this data.
But it encoded the data and when we decoded we got fullName field ... not the two other data fields.
How can we enforce it to give error that this data is not as per the schema created above and has new data fields?
Thanks a lot !
The text was updated successfully, but these errors were encountered: