martin-g commented on issue #252:
URL: https://github.com/apache/avro-rs/issues/252#issuecomment-3177930184

   You could use `#[avro(default = "null")]` on the `subtitle` field.
   It will produce a RecordField like:
   ```
   RecordField {
                   name: "optional",
                   doc: None,
                   aliases: None,
                   default: Some(
                       String("null"),
                   ),
                   schema: Union(
                       UnionSchema {
                           schemas: [
                               Null,
                               String,
                           ],
                           variant_index: {
                               Null: 0,
                               String: 1,
                           },
                       },
                   ),
                   order: Ascending,
                   position: 7,
                   custom_attributes: {},
               },
   ```
   
   But as you already figured out the canonical form won't have the `default` 
field, so most probably you will still get the same error from the registry.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to