Currently there is no way to define a variable array of x primitive elements via lambda DSL:
"componentsIds": [
"A1",
...
"Ax"
]
The only alternative is defining a fixed size array:
(LambdaDslObject) category.array("componentsIds", modelOptionIdsArray ->{
modelOptionIdsArray.stringType()
...
modelOptionIdsArray.stringType()
});
But what would really work here would be an eachLike for an array of primitives.
I've added an eachLike method that supports arrays of primitive values.
This has been released with version 3.6.2
Most helpful comment
I've added an
eachLikemethod that supports arrays of primitive values.