Closed lzehl closed 3 years ago
Personally I think this is a good practice but if it is causing problem somewhere else I think we can mitigate it. But now I want to know where dose it cause problems?
@Peyman-N you mean we should follow the initial decision?
For optional properties, both approaches (allowing empty arrays, or prohibiting empty arrays) would work from the technical point of view. @olinux: please correct me if I'm wrong.
Yes, I think the initial decision was the correct one.
I would stick to our original decision to add "minItems": 1
to all arrays.
This also makes sense to me to stick to it.
This is solved. I close it.
I stumbled upon this issue again in a recent PR.
At one point we defined for required and non-required properties with value
"type": "array"
that they all would need to set"minItems": 1
.Initial argument for this decision: Setting
"minItems": 1
prohibits the validation to go through with an empty array for the required properties as well as the optional properties, because if the values of the optional property are not known, the optional property should rather not be stated in the JSON-LD than stated with an empty array.My question to @olinux @apdavison @jagru20 @UlrikeS91 @skoehnen @bweyers @Peyman-N: Should we follow this initial decision or should we reconsider this?