Skip to content

Comments

Accept enum undefined#162

Open
minettiandrea wants to merge 1 commit intotdegrunt:masterfrom
waveinch:master
Open

Accept enum undefined#162
minettiandrea wants to merge 1 commit intotdegrunt:masterfrom
waveinch:master

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