Version comparison API: Expected machine-readable metadata field names
Nobody has claimed this yet.
- 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?
- Have dataset with at least 2 versions
- Retrieve version comparison via API, e.g. https://demo.dataverse.org/api/datasets/:persistentId/versions/1.0/compare/2.0?persistentId=doi%3A10.70122%2FFK2%2FODTL3M
- What happens?
The returned JSON contains only the human-readable names of the changed metadata fields, not the machine-readable ones like other APIs do:
{
"status": "OK",
"data": {
"oldVersion": {
"versionNumber": "1.0",
"lastUpdatedDate": "2025-04-08T11:01:53Z"
},
"newVersion": {
"versionNumber": "2.0",
"lastUpdatedDate": "2025-04-08T11:02:52Z"
},
"metadataChanges": [
{
"blockName": "Citation Metadata",
"changed": [
{
"fieldName": "Description",
"oldValue": "test",
"newValue": "new description"
},
{
"fieldName": "Keyword",
"oldValue": "",
"newValue": "Test"
}
]
}
]
}
}
I am refering to "fieldName": "Description" and "fieldName": "Keyword". I expected to see dsDescriptionValue and keywordValue instead.
Which version of Dataverse are you using?
v6.6
Any related open or closed issues to this bug report?
Didn't find any.
Are you thinking about creating a pull request for this issue?
Yes, I am open to creating a PR
For example, the dataset API https://demo.dataverse.org/api/datasets/:persistentId?persistentId=doi%3A10.70122%2FFK2%2FODTL3M returns the machine-readable field names as e.g. "typeName": "dsDescriptionValue", so we could simply add a "typeName" key in addition to the "fieldName" key?
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 by reproducing the version-comparison request at the reported API endpoint and compare its response with the dataset API response. Trace how metadataChanges are assembled; done means each changed field retains its human-readable fieldName and also exposes the machine-readable name, such as dsDescriptionValue or keywordValue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100