-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add com.snowplowanalytics.sauna.responders/SendgridConfig/avro/1-0-1 #505
Comments
This is an additive change on an existing released schema - should be a 1-0-1, not a patch... |
@chuwy: does avro4s support multiple schema versions? Adding a 1-0-1.avsc schema to
|
I don't think so. And that is the problem! @alexanderdean what options do we have?
@rzats could you please check if it possible to parse configuration of version |
Technically, according to SchemaVer, for addition you always have a function |
Are you sure about this? A 1-0-1 reader can always consume a 1-0-0, so why would you need to have both schemas available?
Actually I quite like this! It's a very unopinionated representation of SchemaVer at the class level. |
@chuwy: just tested this and no, when a I agree with Alex in that the class naming solution looks good (though a more readable separator would be nice - is $ standard for this sort of thing?) |
|
Let's make |
So default fields are supported by Avro and properly converted to case classes, e.g. "name": "SendgridConfigParameters",
"type": "record",
"fields": [
{
"name": "recipientsEnabled",
"type": "boolean"
},
{
"name": "emailsEnabled",
"type": "boolean",
"default": false
},
{
"name": "apiKeyId",
"type": "string"
}
] becomes
but the problem is a config with a missing |
The issue is caused by avro4s, which does not support optional field deserialization (even though it supports the reverse - i.e. default values in case classes are converted to defaults in the Avro schema). I'll create an issue in avro4s (EDIT: created at sksamuel/avro4s#106), but for now should I go for the class naming solution? |
Yep - class naming solution sounds best for now |
Add a second option to enable the RT command.
The text was updated successfully, but these errors were encountered: