concerto
concerto copied to clipboard
Support max length for array and map
Feature Request 🛍️
Extend the metamodel to support validation facets for the length of an array and the number of keys in a map.
Use Case
Allows the model to define the maximum number of elements in array or map.
Possible Solution
- Update metamodel
- Update CTO grammar and parser
- Update AST printer
- Update validation
Context
Detailed Description
For the max number of keys in a map, here's an example of the syntax I'm thinking of-
map m {
o String
o Integer
-> maxKeys = 3
}
Do let me know if the syntax should be different.