kit-data-manager / kit-data-manager/ro-crate-java
Propagate validation errors instead of boolean return value
- 主要语言
- Java
- 星标
- 5
- 派生
- 4
- PR 合并指标
- 30 天内没有已合并 PR
描述
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).
贡献指南
这个仓库没有索引到贡献指南
调研方向
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.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- backend
- Issue 类型
- 重构
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100