Support adding default values to generated schema
See original GitHub issue@dstelljes I’m creating this issue based on your comment on #7
Since default values aren’t accessible via reflection, maybe an easier way to implement this functionality would be via an annotation? Something to the effect of
public class Message
{
[AvroDefaultValue(null)]
public int? Property { get; set; } = null;
}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to add default values from JSON schema ...
I need to validate a JSON document AND add default values defined in the schema if the values are missing in the given...
Read more >Specify default column values | BigQuery
Set default values You can set the default value for columns when you create a new table. You use the CREATE TABLE...
Read more >Resource schema-based support for static default values
Add resource schema-based support for static default values to the framework. This default value handling would occur during the PlanResourceChange RPC and ...
Read more >How Does a Schema Support Default Fields or NULL Fields?
To enable the schema generated based on the JSON data sample supports the default value or null, select the Convert and Move and...
Read more >Setting default values in the schema of a component in a Job
You can set default values in the schema of certain components to replace null values retrieved from the data source.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dstelljes Hey, I have suggestion.
Since our event models contains domain models, the Kafka related attributes on domain model will create tight coupling to our infrastructure (Avro schema builder in this case) and this usually not a good thing.
Maybe instead of attributes on model we should add some configuration options to schema builder, something like
Support for the
[DefaultValue]
attribute is released with 8.0.0-pre.1.