You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
A low-level detail, rather an internal note:
When there is an enum definition like
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.The text was updated successfully, but these errors were encountered: