At the moment Krasa only supports pattern for Strings.
We have a business scenario where we have Enum which consists of 10 values and There are many complex types which refer to enum but then we need it to be restricted to use only 2 enum values or 3 instead of all of them.
I can see from the sourcecode that there is below code:
else if (simpleType.getFacet("pattern") != null) {
String pattern = simpleType.getFacet("pattern").getValue().value;
if ("String".equals(field.type().name())
Can we have this extended to have restrictions for Enums as well?
At the moment Krasa only supports pattern for Strings. We have a business scenario where we have Enum which consists of 10 values and There are many complex types which refer to enum but then we need it to be restricted to use only 2 enum values or 3 instead of all of them.
Here is a business case for this :: ActionEnum:
complex type:
I can see from the sourcecode that there is below code: else if (simpleType.getFacet("pattern") != null) { String pattern = simpleType.getFacet("pattern").getValue().value; if ("String".equals(field.type().name()) Can we have this extended to have restrictions for Enums as well?
Thanks, Rohan