-
Notifications
You must be signed in to change notification settings - Fork 175
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
Return multiple missing kotlin parameters at once #806
Comments
At least I don't have the motivation to work on this. |
@k163377 Hi, I want to handle |
Use case
We expose public API and we want to to be as descriptive as possible returning bad request response. So we want to return all required null fields at once. By using
KotlinValueInstantiator
andMissingKotlinParameterException
we are able to return just one at the time. So we use @NotNull annotation validation but this requires us to mark non-null fields as nullable and then use ugly!!
in the code eg.Describe the solution you'd like
It would be much nicer if exception thrown by jackson kotlin module contained all fields that are invalid (MissingKotlinParametersException with a list of missing parameters?). Then we could simplify example above to
It could be configurable with some kind of flag to keep backward compatibility and not iterate through all fields if not necessary.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: