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

Accept enum undefined #162

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

minettiandrea
Copy link

No description provided.

@tdegrunt
Copy link
Owner

tdegrunt commented Aug 2, 2017

Hi there,

Thanks for contributing and sorry for the late answer.

Can you explain why this is needed? The standard says the following:

enum: The value of this keyword MUST be an array.
http://json-schema.org/latest/json-schema-validation.html#rfc.section.6.23

This change would be in contradiction with this, but maybe I'm missing out on a certain use case?

Thank you,
Tom

@awwright
Copy link
Collaborator

awwright commented Aug 2, 2017

The test that @minettiandrea provided might have an insight, it looks like the "enum" keyword might incorrectly fail validation if it's set to null/undefined, as opposed to not existing.

@awwright awwright added the bug label Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants