-
Notifications
You must be signed in to change notification settings - Fork 57
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
[Bug] anyOf does not mark field as required #68
Comments
Thanks, looking into this. |
I don't think what you described is the expected behavior. |
@maldimirov Thanks for looking into this. If I understand you right, you're saying that my schema is not valid per spec? If so, both jsonschema and ajv behave not according to spec, as I've mentioned above. But it would explain why enjoi can't deal with it. |
Yes, I think the schema is not valid. And I don't know why
And in your example that is not true. ** If I understand correctly your case, you should be able to just use minProperties. |
Hey there,
thanks for this useful lib, we hope to use it in our system very soon, however we ran into this bug:
Given the following schema:
When I run this code:
I'd expect this to be false, however it returns true. If I take the same schema and run it through ajv or jsonschema, I get the expected results, so I don't think there's anything wrong with the schema.
If I write the same schema directly in Joi, like this:
it also works as expected and does not see the empty object as valid.
Thanks again for building Enjoi, we hope to enjoy it very soon ;-)
The text was updated successfully, but these errors were encountered: