-
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
schema missing a 'type' or '$ref' or 'enum' #57
Comments
I think it’s open to interpretation. Schema definition says it must be a string or array and if a string it must be one of the known primitives. Also:
|
I'm also confused about this, but I interpreted it as not mandatory, because it is not explicitly written anywhere that it is required.
I think this sentence is also ambiguous. Yes, instance validates if and only if the instance is in any of the sets listed for this keyword, but what if there isn't any sets for this keyword. In my opinion Would you please consider to add this assumption to |
Will consider... |
Hi,
JSON schema simplified below throws warning and does not create Joi object.
I'm not sure if this is a bug, or whether
object
type is default, but I validated schema using several validators and they worked as expected. ('type', '$ref', 'enum' seems not to be mandatory)Sample Code
Actual Result
schema missing a 'type' or '$ref' or 'enum'
Expected Result
Joi assertion error
Thanks,
The text was updated successfully, but these errors were encountered: