Open cmeeren opened 6 years ago
I do regret having the default behaviour toLower() rather than camelCasing, unfortunately to change it now is a breaking change so would have to bump the major version.
I do like the idea of using the NamingStrategy to generate the names. It would have to be a different NamingStrategy than the one used for properties as you need to know if you are naming a type
or a property
which is quite reasonable that you want to have different strategies.
The current behaviour of having to extend a ResourceObjectConverter to change naming is not something I like much, but is available to you if you need to get unblocked.
Feel free to raise a PR, otherwise you will have to wait a few weeks until I can find some time to look further into this.
Thanks. Swamped at the moment, so I'll wait. :)
Property names are, by default, converted from e.g.
SomePropertyName
tosomePropertyName
. However, type names are converted fromSomeTypeName
tosometypename
. I know the type names can be overridden using aType
property, but I think the serializer by default should convert type names in the same way as property names. (In particular, since I use a custom NamingStrategy, see #41, I would expect the type name to be converted using the same stragety.)