-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expose translate()
method of standard PropertyNamingStrategy
implementations
#3633
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
Comments
While I see how this might be convenient, from design perspective So I will not make such a change, although I am not completely against improvements that would allow usage. |
Oh. If Would changing
|
Hmmh. The one downside is just that of sort of promoting use of However, given all of above, yes, I think I'll do what you suggest and create Thank you for suggestion! |
translate()
method of standard PropertyNamingStrategy
implementations
Implemented; @toolforger if you can easily build 2.14.0-SNAPSHOT from |
|
I should be able to check on Monday. |
Oh. Wait. Sometimes it's |
Yup, no auto-formatter. I tend to end up fighting more wrt indentation and never get it quite right. As to static final vs final static I forget which one is the canonical one which ends up being one or the other; compilers accept either so to me it does not greatly matter. Just should be same within single class file. Anyway, please LMK if somehow something was missing; otherwise I assume this works like it should :) |
Is your feature request related to a problem? Please describe.
I work on a REST server that uses
PropertyNamingStrategies.SNAKE_CASE
to translate Java property names to JSON field names.The application code needs to report errors to the REST client, using the translated property names, but it has only the Java names.
PropertyNamingStrategies.SNAKE_CASE
does have atranslate
function that does exactly what I need, but it is declared inNamingBase
whileSNAKE_CASE
is declaredasPropertyNamingStrategy
.Describe the solution you'd like
public translate(String)
inPropertyNamingStrategy
, orPropertyNamingStrategy SNAKE_CASE
asNamingBase
orSnakeCaseStrategy
.Usage example
Current application code:
Application code after change:
The text was updated successfully, but these errors were encountered: