-
Notifications
You must be signed in to change notification settings - Fork 14
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
Specification of validator error codes and messages #144
Comments
Can check triples for above in https://json-ld.org/playground-dev/ |
Can we use the wiki to list the error codes, and then write them up in JSON? |
How do you imagine this working with a validator? Would it take this file as input? Would this mean the logic of figuring out the violation would be in software, but the error to raise would be in the configuration? |
But, in general, +1 to the suggestion! |
Also, how does this fit WRT JSON-Schema? |
If I do any work on a validator I want to code only I'm not JSON-Schema expert but I think it would be trivial to write one for this if desired. I think having the data in the code rather than the wiki is better because then we can use issues/PRs etc.. |
Yeah, I'm in favour of having it in some sort of parse-able medium. I was just writing them on the wiki so that we can figure out what we need. I don't see them as the end-point (although it may be useful to generate some sort of human-readable list of error messages). I'm just trying to figure out the mechanics. |
Not intended as an answer to the above but maybe better to index by code instead, and type as Error/Warning/etc.:
|
Yeah, that's better. |
Thinking further on this, I'm inclined to list out the error messages in the wiki first. It will be good to know whether we can match up what we think is an error with what we say in the spec (and identify any omissions either way). Since the structure of the machine readable representation of these is still in flux, it would be good to save that until we can focus on software development and tooling. But I think this is definitely something we should do, and something we should write into the core of any validator(s). |
OK, will mark defer for now. I'm working with the format in #144 (comment) for some trial work on validation at https://github.com/zimeon/ocfl-py/blob/master/ocfl/data/validation-errors.jsonld |
Editors' discussion 2019-07-16 -- going to close this for now and instead focus on the simple list of error code for v1.0 and validator https://github.com/OCFL/spec/wiki/OCFL-Validators |
Rather than use the wiki to draft a set of error codes, I think we should start off with something machine readable. A JSON-LD file that can easily be extended for multilingual support might be good and we could use something as simple as:
and so on with blocks for "warnings" and "info". Something like this would be easy to use in code and also not too horrible as JSON-LD/RDF. We'd need to think a bit about how to maintain references to the specification but it would be quite easy to cut a version by putting the x.y in place of draft or lastest.
The text was updated successfully, but these errors were encountered: