IQSS / dataverse

Open source research data repository software
http://dataverse.org
Other
882 stars 494 forks source link

Updates the updateDataverse API endpoint to support cases where an "inherit from parent" configuration is desired #11026

Open GPortas opened 3 days ago

GPortas commented 3 days ago

What this PR does / why we need it:

The updateDataverse API endpoint has been updated to support an "inherit from parent" configuration for metadata blocks, facets, and input levels.

When it comes to omitting any of these fields in the request JSON:

Previously, not setting these fields meant keeping the existing ones in the Dataverse.

Which issue(s) this PR closes:

Special notes for your reviewer:

I have applied this behavior only to the updateDataverse endpoint, preserving the previous behavior of the UpdateDataverseCommand in other places for backwards compatibility.

Suggestions on how to test this:

  1. Create a Dataverse.
  2. Download https://github.com/IQSS/dataverse/blob/develop/doc/sphinx-guides/source/_static/api/dataverse-complete-optional-params.json
  3. Test updating the created Dataverse by submitting different versions of the previous JSON. (Including the fields mentioned above / not including them)

curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -X PUT "http://localhost:8080/api/dataverses/dvAlias" --upload-file update-dataverse.json Does this PR introduce a user interface change? If mockups are available, please link/include them here:

No

Is there a release notes update needed for this change?:

Yes, attached.

Additional documentation:

None

github-actions[bot] commented 3 days ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:11018-update-dataverse-fix
ghcr.io/gdcc/configbaker:11018-update-dataverse-fix

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 3 days ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:11018-update-dataverse-fix
ghcr.io/gdcc/configbaker:11018-update-dataverse-fix

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 3 days ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:11018-update-dataverse-fix
ghcr.io/gdcc/configbaker:11018-update-dataverse-fix

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 3 days ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:11018-update-dataverse-fix
ghcr.io/gdcc/configbaker:11018-update-dataverse-fix

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 1 day ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:11018-update-dataverse-fix
ghcr.io/gdcc/configbaker:11018-update-dataverse-fix

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 1 day ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:11018-update-dataverse-fix
ghcr.io/gdcc/configbaker:11018-update-dataverse-fix

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 1 day ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:11018-update-dataverse-fix
ghcr.io/gdcc/configbaker:11018-update-dataverse-fix

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.

github-actions[bot] commented 1 day ago

:package: Pushed preview images as

ghcr.io/gdcc/dataverse:11018-update-dataverse-fix
ghcr.io/gdcc/configbaker:11018-update-dataverse-fix

:ship: See on GHCR. Use by referencing with full name as printed above, mind the registry name.