Conversation
ekraffmiller
left a comment
There was a problem hiding this comment.
Hi @vera, thanks for your PR. We don't currently need this use case in our SPA, because we use GetDatasetVersionsSummaries, and GetDatasetVersionDiff to display a list of Dataset versions. But since it is available on the Dataverse API I think it's ok to add. The only caveat I have is to not return the list of files, for performance reasons.
docs/useCases.md
Outdated
| - **limit**: (number) Limit for pagination. | ||
| - **offset**: (number) Offset for pagination. | ||
| - **excludeMetadataBlocks**: (boolean) Exclude metadata blocks (default: false). | ||
| - **excludesFiles**: (boolean) Exclude files (default: true). |
There was a problem hiding this comment.
I think returning the complete list of files in the response could be a problem - some of our datasets have several thousand files. We have another use case, GetDatasetFiles, which returns the files with pagination. My suggestion is to remove files from the response, and use the other use case to get the files with pagination.
There was a problem hiding this comment.
@ekraffmiller thanks for your review and sorry for the delay in getting back to this.
I have removed the excludesFiles param from this client implementation, so it's no longer possible to request the list of files without pagination.
I'm just wondering:
- Should I also add a note in the documentation of the use case that we are differing from the Dataverse API specification here, and why?
- Does this mean that the param should really be removed from the Dataverse API entirely? Or are there other use cases, outside of dataverse-client-javascript, which won't have this problem?
What this PR does / why we need it:
This PR adds code for using the "List Versions of a Dataset" API.
Which issue(s) this PR closes:
I'm not aware of an open issue.
Related Dataverse PRs:
Depends on feat: add "isInReviewState" to API responses about dataset versions dataverse#12008Since during review of IQSS/dataverse#12008, it was decided not to add the
isInReviewStateflag to dataset versions API responses, I've removed them from the code here as well. This PR no longer depends on/is related to any dataverse PRs.Special notes for your reviewer:
/
Suggestions on how to test this:
I've added tests and docs on how to use.
Is there a release notes or changelog update needed for this change?:
Yes
Additional documentation:
/