-
Notifications
You must be signed in to change notification settings - Fork 531
Add datasetType to JSON serialization of DatasetVersion #11589
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
Merged
ofahimIQSS
merged 4 commits into
IQSS:develop
from
poikilotherm:11573-print-datasettype
Jun 25, 2025
Merged
Add datasetType to JSON serialization of DatasetVersion #11589
ofahimIQSS
merged 4 commits into
IQSS:develop
from
poikilotherm:11573-print-datasettype
Jun 25, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
THe reason to add this here is that some client tools might request specific versions of a dataset, but need the information about the type, too. For example some client might want to display a specific version of a software instead of a dataset differently. It is debatable if this should be included here, as so far there is no consensus yet wether or not the type of a dataset should be allowed to change between versions of it. On the other hand, the global ID should also never change, but it is included anyway for the sake of getting back to the dataset via the API if necessary. This should be revisited as a JSON API design issue at a later point, especially as when creating a dataset version, the type is at the root level and the version itself is at a sublevel, rendering the API inconsistent from the start.
pdurbin
approved these changes
Jun 23, 2025
Member
pdurbin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't test this but it looks reasonable.
…PI guide IQSS#11573 Added a note explaining the constancy of `datasetId`, `datasetPersistentId`, and `datasetType` fields for all dataset versions in the API documentation. The first two have been around since v4.18, see also issue IQSS#6397
Contributor
Author
Contributor
|
Looks good - merging! |
Contributor
Author
|
Thanks for merging as always @ofahimIQSS ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
FY25 Sprint 26
FY25 Sprint 26 (2025-06-18 - 2025-07-02)
FY26 Sprint 4
FY26 Sprint 4 (2025-08-13 - 2025-08-27)
Size: 0.5
A percentage of a sprint. 0.35 hours
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

What this PR does / why we need it:
Add
datasetTypeto JSON serialization of DatasetVersion, saving an API call roundtrip to retrieve the type within client libs such as easyDataverse and others.Which issue(s) this PR closes:
JSONPrinterofDatasetVersion#11573Special notes for your reviewer:
This is very minimalistic. There might be some debate necessary how we shall deal with stuff, as in theory the type of a dataset is not version specific but static like the identifier... The current JSON API is potentially not very well designed to handle all of this.
Suggestions on how to test this:
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Nope.
Is there a release notes update needed for this change?:
I don't think so.
Additional documentation:
None.