Open magicDGS opened 6 years ago
@magicDGS I'll take a look at the spec and let you know what I think.
@magicDGS I took a quick look - I'm not sure I'd want to integrate this directly into Barclay, but I would like Barclay to be flexible enough that something like this could be integrated by consumers like you that want to use it. It would be interesting to know if the refactoring PR moves us closer to making that possible.
Because barclay already use annotations for the main functionality of parsing and documenting, I think that a flexible way to validate arguments on the command line will be to use bean validation. This allow to annotate arguments as, for example,
@PositiveOrZero
to constraint an argument to be on that range. In addition, it allows to use custom annotations for downstream projects to add more customization for custom classes (I am thinking about the new URI class in GATK).What do you think, @cmnbroad?
More information about bean validation in http://beanvalidation.org/