Add optional version param to GetFileCitationByFormat - #488
Open
ChengShi-1 wants to merge 2 commits into
Open
ChengShi-1 wants to merge 2 commits into
ChengShi-1 wants to merge 2 commits into
Conversation
ChengShi-1
marked this pull request as ready for review
September 21, 2026 17:08
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Fix the request-argument compatibility, restore the test environment image, and correct the documented default version.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Adds optional dataset-version support to GetFileCitationByFormat, including API plumbing, tests, documentation, and changelog updates.
Changes:
- Forwards optional
versionparameters. - Adds unit, integration, and functional coverage.
- Updates documentation, changelog, and test environment configuration.
| File | Summary |
|---|---|
test/unit/files/GetFileCitationByFormat.test.ts |
Tests use-case forwarding. |
test/unit/files/FilesRepository.test.ts |
Tests request construction. |
test/integration/files/FilesRepository.test.ts |
Tests version-specific API behavior. |
test/functional/files/GetFileCitationByFormat.test.ts |
Tests end-to-end citations. |
test/environment/.env |
Configures the Dataverse test image. |
src/files/infra/repositories/FilesRepository.ts |
Sends the optional version parameter. |
src/files/domain/useCases/GetFileCitationByFormat.ts |
Exposes the version argument. |
src/files/domain/repositories/IFilesRepository.ts |
Updates the repository contract. |
docs/useCases.md |
Documents version selection. |
CHANGELOG.md |
Records the API change. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+243
to
+246
| return this.doGet( | ||
| this.buildApiEndpoint(this.accessResourceName, `citation/${format}`, fileId), | ||
| true | ||
| true, | ||
| version === undefined ? {} : { version } |
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:
Add optional version param to GetFileCitationByForma
Which issue(s) this PR closes:
Related Dataverse PRs:
Special notes for your reviewer:
Suggestions on how to test this:
Is there a release notes or changelog update needed for this change?:
yes
Additional documentation: