{
final AvroSchemaGenerator generator = new AvroSchemaGenerator(new Config(resolverPath));
if (optionalDefault != null)
{
final OptionalDefaultMode optionalDefaultMode = OptionalDefaultMode.valueOf(optionalDefault.toUpperCase());
generator.getDataToAvroSchemaTranslationOptions().setOptionalDefaultMode(optionalDefaultMode);
}
generator.generate(targetDirectoryPath, sources);
}