-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Description
A low-level detail, rather an internal note:
When there is an enum definition like
"exampleEnum": {
"type": "string",
"enum": [
"VALUE_A",
"VALUE_B"
]
and the JSON input contains something like
exampleEnum: 12345
then this is reported as
VALUE_NOT_IN_LIST: The 'exampleEnum' property has the value 12345, but must be one of VALUE_A,VALUE_B
This is correct and reasonable.
One could make a case that this should be reported as a
TYPE_MISMATCH: The 'exampleEnum' property must have type 'string', but has type 'number'
But I think that this is a special case, where the type itself does not matter so much, and the details (i.e. the allowed values) add valuable information that justify using the more specific VALUE_NOT_IN_LIST issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels