9656 - API support for optional dataset parameters required by the frontend#9657
Merged
9656 - API support for optional dataset parameters required by the frontend#9657
Conversation
This comment has been minimized.
This comment has been minimized.
pdurbin
reviewed
Jun 20, 2023
Comment on lines
377
to
+380
| JsonObjectBuilder bld = jsonObjectBuilder() | ||
| .add("id", dsv.getId()).add("datasetId", dsv.getDataset().getId()) | ||
| .add("datasetPersistentId", dsv.getDataset().getGlobalId().asString()) | ||
| .add("storageIdentifier", dsv.getDataset().getStorageIdentifier()) | ||
| .add("id", dsv.getId()).add("datasetId", dataset.getId()) | ||
| .add("datasetPersistentId", dataset.getGlobalId().asString()) | ||
| .add("storageIdentifier", dataset.getStorageIdentifier()) |
Member
There was a problem hiding this comment.
jsonObjectBuilder() is already NullSafeJsonBuilder to it should be safe to add
.add("alternativePersistentId", dataset.getAlternativePersistentIdentifier())
for example.
…ional-dataset-params
…taverse into 9656-api-optional-dataset-params
Contributor
Author
|
Thank you for the notes, @pdurbin ! I refactored it to make it simple (without null checks), thanks for noticing. |
|
📦 Pushed preview images as 🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
pdurbin
approved these changes
Jun 22, 2023
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Includes changes from #9592, so PR #9592 should be merged first.
Extends the dataset version payload from the API, by adding fields alternativePersistentId, publicationDate and citationDate.
Which issue(s) this PR closes:
Closes #9656
Special notes for your reviewer:
The changes are required for the new js-dataverse changes to work (IQSS/dataverse-client-javascript#68)
Suggestions on how to test this:
curl -H "X-Dataverse-Key: <API_KEY>" -X GET http://localhost:8080/api/v1/datasets/:persistentId/versions/:latest?persistentId=<DOI>Note: alternativePersistentId follows the same logic as the other fields. If it exists, it is included in the response body.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No
Is there a release notes update needed for this change?:
No
Additional documentation:
N/A