Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds client support for setting and unsetting a Dataverse collection’s default dataset template.
Changes:
- Introduces
SetTemplateAsDefault/UnsetTemplateAsDefaultuse cases and exports them viasrc/templates. - Adds
setTemplateAsDefault/unsetTemplateAsDefaultmethods toTemplatesRepositoryandITemplatesRepository. - Adds unit, integration, and functional tests plus documentation/changelog updates.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/templates/UnsetTemplateAsDefault.test.ts | Unit coverage for UnsetTemplateAsDefault use case behavior and error propagation. |
| test/unit/templates/SetTemplateAsDefault.test.ts | Unit coverage for SetTemplateAsDefault use case behavior and error propagation. |
| test/integration/templates/TemplateRepository.test.ts | Integration coverage for new repository methods against the API. |
| test/functional/templates/UnsetTemplateAsDefault.test.ts | Functional coverage for end-to-end unsetting default template via public API. |
| test/functional/templates/SetTemplateAsDefault.test.ts | Functional coverage for end-to-end setting default template via public API. |
| src/templates/infra/repositories/TemplatesRepository.ts | Implements POST/DELETE calls to Dataverse default-template endpoints. |
| src/templates/index.ts | Exposes new use cases from the templates module. |
| src/templates/domain/useCases/UnsetTemplateAsDefault.ts | New use case wiring to repository for unsetting default. |
| src/templates/domain/useCases/SetTemplateAsDefault.ts | New use case wiring to repository for setting default. |
| src/templates/domain/repositories/ITemplatesRepository.ts | Extends repository contract with set/unset default methods. |
| docs/useCases.md | Documents new templates write use cases and example calls. |
| CHANGELOG.md | Notes new use cases/repository support for default-template endpoints. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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:
Based on PR IQSS/dataverse#11989 , set a template to default and remove a template's default setting
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?:
Additional documentation: