Optional fields like cam should not have a minItem=1 constraint.
The background for this is that we're implementing a SpaceAPI in Rust, which is statically typed. If we specify that a SpaceAPI struct contains a cam struct of a vector type, then the default serialization for it -- given that there are no cams -- is an empty list.
Alternatively we could also set the field to null by using Rust's Option<Vec<String>>, but in my eyes an empty list makes more sense. It actually communicates that there are no cams in our space.
Optional fields like
cam
should not have aminItem=1
constraint.The background for this is that we're implementing a SpaceAPI in Rust, which is statically typed. If we specify that a
SpaceAPI
struct contains acam
struct of a vector type, then the default serialization for it -- given that there are no cams -- is an empty list.Alternatively we could also set the field to
null
by using Rust'sOption<Vec<String>>
, but in my eyes an empty list makes more sense. It actually communicates that there are no cams in our space.