-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Improve validation feedback? #3
Comments
I would need to dig in further on this, as I am relying on jsonvalidate R package for validating and I don't have any prior experience on json validating. A bit off-topic, but you mentioned on citation-file-format/citation-file-format#340:
Is this one? If so, may I borrow it to complete my tests? Thanks |
Working on printing suggestion, now the error shows
This is pure markdown, so it can be also copied and pasted like this: Table: See errors
|
Yes, I think it's actually a bit of work, and may not always work as expected, as you'd have to catch the original error messages (which may also not be stable across versions of the validation package dependency), then process them and probably add heuristics to cover the CFF semantics.
Yes, it's that one. Go ahead and use it for tests, absolutely. |
Nice one! That's definitely an improvement. |
Just for info, what I get from this: cff-validator/examples/key-error/CITATION.cff Lines 1 to 19 in 90b5a70
is: Table: ./examples/key-error/CITATION.cff errors:
See Guide to Citation File Format schema version 1.2.0 for debugging. File extracted from artifact in https://github.com/dieghernan/cff-validator/blob/main/examples/key-error/citation_cff_errors.md |
Hi again,
This is something that all validation using generic JSON Schema validation packages have to deal with: the validation results may not be found very helpful in some cases, especially for users not experienced in schema validation. Improving the output is a lot of work and needs implementation of extra logic, but would help the user. Also, perhaps this could also be done in the upstream dependency itself. So this is more of a suggestion for discussion than a feature request.
E.g.,
1 data has additional properties
(there is an extra keyextra
in the test file). It'd be great if in this case, the name of the addtl. property was provided.1 data["date-released"] referenced schema does not match
. I think this is good enough. ✔️1 data.authors is required
. Good enough ✔️Additionally, I'm not sure that the
field
andmessage
output are helpful/well-aligned with the output from the validation package:------ field message 1 data["date-released"] referenced schema does not match
The text was updated successfully, but these errors were encountered: