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
As we are using enums to validate values that can have only a specific set of values, we identified a series of very confusing validation error messages.
8 is not one of ['6.1', '7.1', '7.2', 'all']
As you can see the 8 does not have quotes, because in that case the user introduced int/float instead of string. Still, schema does not do anything about this and just displays the message.
What makes it even more confusing is that you do not see '8', being listed among possible accepted values. That is because we make use of a big oneOf which checks among various combinations of platform name and platform-versions. Basically validator fails to find any combination as working and displays the first failure.
I am not sure how to fix it but I know that we do have the type string mentioned for all of them and it I suspect that the first thing we should do is to ensure we raise an error about type before looking at the enum. If type is not the expected one, it makes to sense to complain about the list of allowed values?
The text was updated successfully, but these errors were encountered:
As we are using enums to validate values that can have only a specific set of values, we identified a series of very confusing validation error messages.
As you can see the 8 does not have quotes, because in that case the user introduced int/float instead of string. Still, schema does not do anything about this and just displays the message.
What makes it even more confusing is that you do not see
'8'
, being listed among possible accepted values. That is because we make use of a bigoneOf
which checks among various combinations of platform name and platform-versions. Basically validator fails to find any combination as working and displays the first failure.I am not sure how to fix it but I know that we do have the type string mentioned for all of them and it I suspect that the first thing we should do is to ensure we raise an error about type before looking at the enum. If type is not the expected one, it makes to sense to complain about the list of allowed values?
The text was updated successfully, but these errors were encountered: