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

Add support for required schema keyword #37

Closed
jdorn opened this issue Dec 29, 2013 · 0 comments
Closed

Add support for required schema keyword #37

jdorn opened this issue Dec 29, 2013 · 0 comments

Comments

@jdorn
Copy link
Owner

jdorn commented Dec 29, 2013

The required keyword lists the specific properties of an object that must be set. Currently, all object properties are always set, so validating against this doesn't make any sense. To add support for this keyword, we can do one or both of the following:

  1. Change the meaning of required to mean not-empty. This means a blank string will fail. This will be inconsistent with the specification, but more inline with other implementations and common usage. I think this should be the default behavior and have an option to use the spec definition of required instead.
  2. Add a way to remove non-required properties from objects. This will open the door to supporting other schema keywords additionalProperties, patternProperties, maxProperties, and minProperties.

A potential UI for removing properties could be something like this:

remove_property

@jdorn jdorn closed this as completed in 2b4958b Dec 29, 2013
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