Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove minItems for all optional fields #7

Open
dbrgn opened this issue May 5, 2015 · 0 comments
Open

Remove minItems for all optional fields #7

dbrgn opened this issue May 5, 2015 · 0 comments

Comments

@dbrgn
Copy link

dbrgn commented May 5, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant