galatea-associates / fuse-starter-kafka-streams

MIT License
0 stars 3 forks source link

TopicConfig should allow registration of alias regex patterns and method of conversion #10

Open GalateaWade opened 4 years ago

GalateaWade commented 4 years ago

There are cases where field names are all camelCase but tests may use PascalCase or some other naming convention for fields which could be programmatically aliased to the correct field name. TopicConfig should allow registration of regex patterns for matching test field names, and a method that returns the aliased field name.

TopicConfig#registerAliasPattern(Pattern aliasPattern, BiFunction<String, Matcher, String> convertTestFieldNameToObjectFieldName)

The evaluation of alias patterns should be done immediately prior to evaluating strict alias replacements, so an alias pattern could map to an alias.