You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: