netceteragroup / valdr-bean-validation

Java Bean Validation plugin
MIT License
35 stars 21 forks source link

configuration mapping for custom datatypes #29

Open hohwille opened 9 years ago

hohwille commented 9 years ago

a well structured data-model makes use of datatypes. In JSON they are hidden away and get regular strings. Still they constraints associated with the datatype are required in the client. Hence I would expect a feature to configure a mapping such as "io.github.project.type.Email": {"email": {...}" or "io.github.project.type.GermanPostalCode": {"pattern": { "value": "[0-9]{5}"}}.

Without such feature I am using a generic code generator and write templates for the generation myself instead.