IQSS / dataverse

Open source research data repository software
http://dataverse.org
Other
885 stars 496 forks source link

Validation fails for import API where it did not fail before #8212

Open PaulBoon opened 3 years ago

PaulBoon commented 3 years ago

Use the import API to create a dataset with 'release=no', but don't specify the contact email in the json. it fails with the error: "Validation Failed: Contact E-mail is required.". But this used to be no problem.

The UI does also enforce this, but when you create a dataset on the UI this fields are automatically filled in for you. It makes sense to have the API behave similar to the UI, but it would help to prevent this problem by mentioning it explicitly in the API documentation. Or the API could use the information of the user issuing the import request, to also auto-fill the required fields for Author and Contact.

I don't think it is a real bug, it actually feels more like an improvement, but it was an undocumented surprise.

Which version of Dataverse are you using? 5.7

Any related open or closed issues to this bug report? Could be related to #8209

pdurbin commented 2 years ago

@PaulBoon is this the same issue as...

For that, we adjusted the docs in this PR: