-
Notifications
You must be signed in to change notification settings - Fork 280
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
Enum: Validating allowed null value fails #126
Comments
Sorry, it is added, but validation fails nevertheless. |
See #127 |
erosb
added a commit
that referenced
this issue
Dec 17, 2017
erosb
added a commit
that referenced
this issue
Dec 17, 2017
`EnumSchema#toJavaValue()` - which is supposed to unwrap an org.json value to be a "plain java" value didn't handle the `JSONObject#NULL` -> `null` conversion, so this is fixed now. Also adding a more proper test for checking what enum values are loaded during the schema loading process.
Fixed in 60cbcca . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider the following enum schema:
"enum": [null, "foo", "bar"]
A valid null value in the JSON instance will be considered invalid, because the null is not added to the set of possible values.
The text was updated successfully, but these errors were encountered: