-
Notifications
You must be signed in to change notification settings - Fork 10
Set/Unset a Template as Default #414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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: