Experimental dataset JSON GET API doesn't return multi-valued fields as arrays
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
What steps does it take to reproduce the issue?
- Create dataset with multi-valued field, e.g.
subjectin the citation block - Use experimental GET API to retrieve dataset https://guides.dataverse.org/en/latest/developers/dataset-semantic-metadata-api.html#get-dataset-metadata e.g.
GET /api/datasets/42/metadata
- What happens?
The multi-valued field values are not returned as arrays, e.g. 'subject': 'Medicine, Health and Life Sciences'
Side note, the non-experimental API https://guides.dataverse.org/en/latest/api/native-api.html#get-json-representation-of-a-dataset does not have this bug: {'typeName': 'subject', 'multiple': True, 'typeClass': 'controlledVocabulary', 'value': ['Medicine, Health and Life Sciences']}
- What did you expect to happen?
The multi-valued field values to be returned as arrays, e.g. 'subject': ['Medicine, Health and Life Sciences']
Which version of Dataverse are you using?
v5.13
Any related open or closed issues to this bug report?
/
Screenshots:
/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the experimental GET API at /api/datasets/42/metadata and compare its multi-valued field response with the native API representation described in the linked documentation. Reproduce the subject-field case and verify that multi-valued fields are returned as arrays; an open pull request is already linked to this issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 20/100