-
-
Notifications
You must be signed in to change notification settings - Fork 371
Closed
Milestone
Description
The specification says that enum may include null.
If type does not also include null, although the validation check for the enum key word will pass, the validation check for the type key word will mean the instance fails overall validation. The inverse is also true.
Usecase:
I have a value which may be a number of strings, or null.
Valid values are "a", "b", or NULL.
To define and pass validation:
I must set the type to ["string", "null"]
AND
I must set enum to ["a", "b", null]
If we want to keep this behaviour, as we are commenting that enum may be null, we should point out that when doing so, if you expect validation to pass for an instance where you define the type, you must also include null in the type.
stoicskylinenickveys, ProgrammerAnthony, FabijanC and codebycarlos
Metadata
Metadata
Assignees
Labels
No labels