kit-data-manager / kit-data-manager/ro-crate-java
Propagate validation errors instead of boolean return value
- Dominant language
- Java
- Stars
- 5
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
In order to account for simplification, we often use validation on a true/false basis. But I think that sometimes it may be useful to get a list of error messages. As a first step, we should propagate these errors at least in classes such as `JsonSchemaValidation`. Instead of a boolean, we could return an Optional or so. The boolean style checks can then still performed like `boolean isValid = errors.isEmpty()` or so. We can then consider in each place this is used how to handle this information. In some parts the boolean logic is likely ok and enough, in others it may make sense to have handling code or provide it to the caller (and possibly to the user, especially when it comes to creating crates).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the JsonSchemaValidation class and tracing its boolean validation callers, including the logic used when creating crates. Determine how validation messages should be propagated while preserving callers that only need a boolean; completion requires an agreed scope and handling strategy across those use sites.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100