linkedin / linkedin/goavro

Is there a way to ignore a property to be serialized if missing from schema?

Open
#294 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.1k
Forks
232
PR merge metrics
No merged PRs in 30d

Description

I'm trying to support easier schema evolution so that code with new properties can be deployed before the new schema is published.
out of the box, if you have an extra property to be serialized that doesn't exist in your schema, it will through an error `cannot determine codec: "{field_name}"`.
Is there a way to make the serialization more lenient and just skip any property that is NOT defined in the schema?
In the Pydantic world, it would be equivalent to the `extra: ignore` property.

I couldn't see a way at first glance.
Please advise

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the serialization path that reports `cannot determine codec` when a property is absent from the schema. Determine whether unknown properties can be skipped without affecting defined fields, and check the existing schema and codec handling around that path. Done means serialization succeeds while omitting properties not defined in the schema.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.