-
Notifications
You must be signed in to change notification settings - Fork 114
Description
Describe the problem
Currently the @Required annotation is used on the schema files both at a Class level (for required files) and the Property level (for required fields). This can be confusing and recently, we in #1198 we had a scenario where a column was required, but it was not required that the field have data for the column. We discussed adding a new annotation when a column Header is required, but the column data can be empty (not required), which led to discussion of the existing @Required annotation.
Proposed solution
I think for additional clarity, it would make sense to break the original @Required header into two:
@RequiredFile - when the file can not be missing from the feed (valid on the schema Class)
@RequiredValue - when a value is required for the field (
@RequiredColumn - when the column (header) is required, but the field (value) is allowed to be empty
Alternatives you've considered
Leave @Required as-is, and just add the new @ RequiredColumn annotation for the new case.
Additional context
No response