-
-
Notifications
You must be signed in to change notification settings - Fork 586
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
Switch to change default naming strategy #128
Comments
I see there is a IdenticalPropertyNamingStrategy, but how to plug it in, so it's used? Cheers, Anton |
Hey @schmittjoh! Could you elaborate on this issue please? I have the same requirement. It would be great if I would be able to change naming strategy in one place instead of specifying "SerializedName" annotation on every property. Thank you! |
I found solution in this thread: For now, I'm using this configuration override:
But it's not respecting the I would love to see this configuration moved to bundle config though ) Also, it would be great to have an annotation, say |
@schmittjoh or anyone, Is there any update on this? This seems a bit redundant to have to do and could be the default IMO. I can help if I know it's something you want to change in the lib. :) /**
* @JMS\SerializedName("fooBar")
*/
protected $fooBar; |
Can be solved with a custom naming strategy |
Having upgraded jms/serilizer-bundle from 1.1 to 2.2 the parameter hack described above did not work. You can override the service definition as follows:
|
Hi there!
I can't find a possibility to switch the naming strategy so it's not converting from camelCase to underscored. I really don't understand why this is the default behaviour and setting a SerializedName annotation for all properties in all entities is really nothing we'd like to do.
So, am I missing some switch somewhere?
If not, would it be possible to add that?
Cheers, Anton
The text was updated successfully, but these errors were encountered: