jsonschema-generator
jsonschema-generator copied to clipboard
feat: java validation support on supplier method
You can now add annotations on the supplier method. This is useful for value objects, which consist of one value which resides in a base class.
public class PositiveInteger extends SimpleValueObject<Integer> {
public PositiveInteger(@NonNull Integer value) {
super(value);
isTrue(value >= 0, "value needs to be greater or equal zero");
}
@Override
@Min(0)
public Integer get() {
return super.get();
}
}