| Hi Asaf Mesika, hard to give an exact number, but it's not a huge task. Essentially, that's what has to be done:
- Define an SPI contract similar to ParameterNameProvider, but dedicated to property names (fields, getters) and defined in HV
- Have a default implementation which uses the property name (i.e. current behavior)
- Allow to pass in implementations of that contract via XML, HibernateValidatorConfiguration and HibernateValidatorContext
- Propagate the implementation passed in to the right place where we need to determine the property name
- Update the documentation to discuss that new feature
In general, it'd mean pretty much to do the same thing as for ParameterNameProvider, i.e. look where this one is used, passed on etc. and do the same for that new contract. As a bonus, we could think about an annotation-based implementation of that new contract which we provide. That one would take an annotation type and optionally an annotation member name (defaulting to value) and would return property names based on that annotation. That way for the Jackson use case people would just have to configure that specific implementation instead of providing their own one. |