-
Notifications
You must be signed in to change notification settings - Fork 16
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
check keyword rules #173
Comments
Yep, thesaurus is a citation- so a title is required. For keyword{} the thesaurus must either be a valid citation or not present. As noted, an empty object is considered invalid. |
Yes, title is required for citation, but citation (thesaurus) is not required for keyword. The empty thesaurus object ("thesaurus": {}) is behaving as if a citation is present. I don't remember us making a rule that empty objects are to behave as loaded objects, but maybe we did. I checked other tests and empty objects are ignored. Then I figured out it was because of the way I'm testing. I only test the component in question, I don't run usually run it in from the top and generate a full metadata record. Just testing the module bypasses the schema validation which is early in the stack. And when I do the schema tests they are done on complete objects. So I guess we did decide (or have to) treat empty objects as complete objects. Kind of sucks. |
That's just the nature of the schemas. If we have any required properties for an object, an empty object is going to fail validation. In theory, We could write the schemas to allow an empty object, but that would require the |
It is what it is. |
thesaurus is not required in a keyword set. However, when thesaurus appears as an empty hash it does not pass validation. Message is "citation is missing title".
The text was updated successfully, but these errors were encountered: