-
Notifications
You must be signed in to change notification settings - Fork 0
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
Spin off validation logic to separate repository #106
Comments
Where do you see InputValidationIssues.java fit in? In the problem library or in the validation library? |
Good point, I'd put at least the standardized business-agnostic issue types in rest-problem-java (like referencedResourceNotFound). Not sure about the business-specific ones (like replacedSsin and canceledSsin). It's a bit the same discussion about whether they should be included in the REST guide. Maybe best in the validation library where they can evolve with the validations themselves. Then again, they might be reusable by other validation libraries as well, but that's probably a rather theoretical advantage. |
There was some earlier discussion about overlap between belgif-rest-problem-validator and SmalsValidation library in #16. I also wonder, in your current REST APIs using the SmalsValidation library: how do you map the Bean Validation exception to a BadRequestProblem? Are they mapped to |
Seems to differ across APIs, I haven't found a common implementation for our Spring projects. For JAX-RS, there is a lib in use that:
|
As was mentioned in belgif/rest-guide#169, there are some concerns of combining the validation logic of (business) values with the problem library.
I'd suggest to spin this off to a separate project because:
Some differences with the smalsutils-validation library:
Ideally, we could have a single validation logic for Java and integrate with different ways of using it (programmatic validation, bean validation, inside or outside a REST API context, ...)
The text was updated successfully, but these errors were encountered: