Closed FunFunFine closed 2 years ago
Also question: should we add renamed fields from transformedFields
to Config.ForProduct#fieldRenaming
function? It has something to do with priority of those and stuff.
Also question: should we add renamed fields from transformedFields to Config.ForProduct#fieldRenaming function? It has something to do with priority of those and stuff.
Yeah, I suppose we need to refactor Config a little bit to a Map[String, FieldInfo]
If someone would want to make only one field of product to be snake case, then they would need to copy paste it as in
@Rename("snake_cased_field_name)" SnakeCasedFieldName
. This PR makes that task easier by allowing to write@SnakeCase
annotation directly near the field.Also this PR adds kebab-case and PascalCase just to be kinda complete.
Also, as I didn't know the project was unformatted, this MR formats a bunch of files. If required, I can do it in a separate PR.