Skip to content

Add optional version param to GetFileCitationByFormat - #488

Open
ChengShi-1 wants to merge 2 commits into
developfrom
459-extend-get-file-citation-other-formats-add-version-parameter
Open

ChengShi-1 wants to merge 2 commits into
developfrom
459-extend-get-file-citation-other-formats-add-version-parameter

Conversation

@ChengShi-1

@ChengShi-1 ChengShi-1 commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

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:

@ChengShi-1 ChengShi-1 linked an issue Sep 21, 2026 that may be closed by this pull request
@github-actions github-actions Bot added the GREI Re-arch GREI re-architecture-related label Sep 21, 2026
@ChengShi-1
ChengShi-1 marked this pull request as ready for review September 21, 2026 17:08
Copilot AI lite review requested due to automatic review settings September 21, 2026 17:08
@ChengShi-1 ChengShi-1 added FY27 Sprint 6 FY27 Sprint 6 (2026-09-09 - 2026-09-23) Size: 3 A percentage of a sprint. 2.1 hours. labels Sep 21, 2026
@ChengShi-1 ChengShi-1 moved this to Ready for Review ⏩ in IQSS Dataverse Project Sep 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 High severity

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 version parameters.
  • 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 }
Comment thread test/environment/.env Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY27 Sprint 6 FY27 Sprint 6 (2026-09-09 - 2026-09-23) GREI Re-arch GREI re-architecture-related Size: 3 A percentage of a sprint. 2.1 hours.

Projects

Status: Ready for Review ⏩

Development

Successfully merging this pull request may close these issues.

Extend Get File Citation other Formats: add version parameter

2 participants