Hey all,

        I’ve been using the Ruby Avro implementation and have run into two 
issues with schema validation. (I’m using the avro_patches gem to make use of 
the SchemaValidator class until it’s available in an actual release.)

        1) The validator will cheerfully allow extra fields to be added to the 
payload and will not complain. This caused issues when we were using the wrong 
local schema and assumed the values were being sent downstream, when instead 
they were just being swallowed.

        2) The validator does not check that default values match the type of 
the field. In our case we had a default value of null but the type of the field 
was string. This caused crashes when clients assumed the default matches the 
type.

        I have patches to fix these two issues. Any concerns with opening PRs 
against the Ruby part of the repo? I’d open the same PRs against avro_patches.

        Thanks!

-----------------
Daniel Orner
Flipp Inc.
(416) 455-8293




-- 
IMPORTANT NOTICE:  This message, including any attachments (hereinafter 
collectively referred to as "Communication"), is intended only for the 
addressee(s) named above.  This Communication may include information that 
is privileged, confidential and exempt from disclosure under applicable 
law.  If the recipient of this Communication is not the intended recipient, 
or the employee or agent responsible for delivering this Communication to 
the intended recipient, you are notified that any dissemination, 
distribution or copying of this Communication is strictly prohibited.  If 
you have received this Communication in error, please notify the sender 
immediately by phone or email and permanently delete this Communication 
from your computer without making a copy. Thank you.

Reply via email to