-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Obscure schema validation error in case of missing required properties #242
Comments
Hi there! Your intuition on this is correct: However, this isn't really something for One thing that you can do today is use the I take this, from the If you look at the We can specify an alternative "best match" algorithm. I don't think there's a singular clear improvement here, but I'll continue to think about what we can do. |
I just took a crack at adding something on this front which shows the "best deep match". You can see an example of the results here: #303 I tried a number of ways of ranking the errors and it turns out that "best error" is just a very hard thing to characterize in a generic way. The best error is the one which relates to the user's intent. That is, suppose a schema gives options for DeployX and DeployY, then even if your input is most similar to the "DeployX" shape, if you're trying to write a "DeployY" document, your preferred errors are those from the "DeployY" branch of the schema. Sometimes, ranking This should be shipping out in the next |
Consider the following
azure-pipelines.yml
file which passes validation:Now, remove one of those inputs, e.g.
azureContainerRegistry
. Instead of a error hinting that a required property is missing the following completely arcane error which includes entire input yaml formatted as json is reported:As a developer I do understand that this may be what the underlying schema validation library reports but it can hardly be called user friendly. I believe either some workaround in this tool or, better yet, an issue opened against validation library is due.
The text was updated successfully, but these errors were encountered: