Skip to content

Allow strict validation with fastavro, to fail when extra fields are present in the records #1423

Open
@antopolskiy

Description

@antopolskiy

Description

Currently, if json data has extra fields in the record, AvroSerializer will not fail, it will silently ignore the extra fields, which can be detrimental in some applications, for example which rely on gathering data from 3rd party APIs.

Recenly, fastavro added options of strict and strict_allow_default to schemaless_writer (see source code here and here for discussion), which will make the validation fail if there are extra fields in the record.

I propose to add this feature in AvroSerializer, I guess these would be simply passthrough parameters to schemaless_writer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:schema-registryAny schema registry related isues rather than kafka isolated onesenhancementRequesting a feature change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions