Define additional data for a constraint

Description

In our company we use java bean validation for our restful api's. With some constraints it would be helpful to have a bit more context then just a message.

Something like:

this would allow to have additional data in a constraint violation that can be used together with the message(template) to create a meaningful error response including some structured data, thus making it easy to read and interpret by a machine.

For sure such a feature needs quiet some polishing to make it suitable for all the possible cases. But at least i wanted it to be placed here for further discussion.

Environment

None

Activity

Show:
Julien May
July 20, 2015, 6:27 PM

yes, that make sense to me. let me see if i can find the time to create the first pr.

Gunnar Morling
September 16, 2015, 3:12 PM

Hey , did you find the time to see whether you could implement that in HV? I can help to get you started, just let me know if you'd like to give it a try.

Julien May
September 23, 2015, 12:52 PM
Edited

Hey @Gunnar Morling i did not yet have time to do any progress there. i def. want to give i try. let me look at it in the upcoming days and i will come back to you in case of questions or starting hints. what's the way to get in touch with you? not sure it makes sense to bloat this issue with impl. details

Gunnar Morling
September 23, 2015, 3:18 PM

For discussing it spec-wise, commenting on this issue is fine; Alternatively subscribe to and start a discussion on the BV mailing list.

For prototyping it in the BV reference implementation Hibernate Validator, I suggest you open up a separate issue in the HV project, state you'd like to work on, get started hacking on it and submit a PR on GitHub as soon as you have something which shows the general direction so you can get feedback early on.

Many thanks for getting involved!

Julien May
October 7, 2015, 10:42 AM

Assignee

Unassigned

Reporter

Julien May

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

Yes, likely

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Major
Configure