-
Notifications
You must be signed in to change notification settings - Fork 500
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
validate API endpoint doesn't enforce DataCite requirements #6586
Comments
@jggautier sounds right but let's let @donsizemore confirm. 😄 @donsizemore I assume that |
@jggautier @pdurbin correct on both points. |
Thanks. This sounds like the problem described in this GitHub issue. It still happens in Dataverse 4.19, but I'm guessing it hasn't come up often because people haven't been trying to publish datasets where the Producer URL field has a value but the Producer Name field does not. |
FWIW - I think I played around at one point with the idea of being able to make a metadatablock child entry 'required' with the parent 'optional', so one could potentially require a producer name and url if one is entered (if I understand the structure of producer). If that's useful, let me know. (I think I had code - it may even be in qdr's fork.) |
I agree it would be useful to be able to validate for things like this - but should it be a different API? This "admin/validate/dataset" API was only meant for database constraints; all it does it tries to instantiate entities and checks for ConstraintViolationExceptions. |
Closing in favor of #7551 |
Possibly related to #6380 though the Dataverse instance in question is still on 4.16. It is possible to create a dataset with metadata which passes validation via endpoint:
but lacks certain fields required by DataCite:
Response code: 422, [facet 'minLength'] The value has a length of '0'; this underruns the allowed minimum length of '1'. at line 31, column 0]]
In our case this turned out to be a producer URL not being accompanied by a producer name, but with only the above to go on from DataCite, this took a while to find.
If catching such a condition is outside the scope of the validate endpoint and/or I'm comparing tangerines to clementines, feel free to close this issue.
The text was updated successfully, but these errors were encountered: