IQSS / IQSS/dataverse

Validation fails for import API where it did not fail before

Open
#8,212 1 comment 2 reactions 1 assignee View on GitHub

@PaulBoon is already working on this.

Since Oct 12, 2022.

Feature: API Type: Bug User Role: API User
Dominant language
Java
Stars
1.1k
Forks
564
Avg merge
2d 2h
Merged PRs (30d)
29

Description

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.

  • What did you expect to happen?
    Create a draft dataset as before (in version 5.6)

Which version of Dataverse are you using?
5.7

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.