-
Notifications
You must be signed in to change notification settings - Fork 495
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
Adds new update dataverse general endpoint #10925
Conversation
This comment has been minimized.
This comment has been minimized.
…e new update endpoint
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi @GPortas Sorry I didn't take a look at the code if it would have answered my question. |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi @DS-INRAE, If I understood it correctly, your issue is related to creating custom metadata structures for collections, while this PR focuses on creating a new endpoint for updating existing collections based on the only structure currently supported. So I think your requested changes are not related, sorry! |
📦 Pushed preview images as
🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
Not sure if it's 100% related to the issue at hand here, but I think it would be helpful in general and possibly to make this endpoint more useful for the non-SPA user if we updated the getDataverse endpoint/ jsonPrinter for Dataverses to include/return the metadata blocks for the Dataverse |
Yes, it is not entirely related to this issue, as we are only focusing on the creation of the dataverse through the API, not on reading it. Currently, if you want to obtain the metadata blocks of the dataverse, you would have to call the listMetadata blocks endpoint separately from the getDataverse endpoint. It could be interesting, as you say, to offer the option in the future to get everything together in the getDataverse endpoint. We can create an issue to prioritize this at some point. |
@GPortas you should probably update this from DEV. A branch that I have a PR was failing until I got the reverted artifact branch that was just merged |
…ataverse-collection
Testing Complete - No issues found. Merging PR. |
I made a followup pull request here about docs: |
What this PR does / why we need it:
Adds a new endpoint (
PUT /api/dataverses/<identifier>
) for updating an existing Dataverse collection using a JSON file following the same structure as the one used in the API for the creation.Which issue(s) this PR closes:
Special notes for your reviewer:
I have refactored commands
CreateDataverseCommand
andUpdateDataverseCommand
, so that they now inherit from a common parent class calledAbstractWriteDataverseCommand
, where the shared logic of these commands is centralized.Suggestions on how to test this:
Call the new API endpoint using curl:
curl -H "X-Dataverse-key:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -X PUT "http://localhost:8080/api/dataverses/<ALIAS_OF_CREATED_DV>" --upload-file <YOUR_JSON_FILE>
Verify that the new properties specified in the JSON are correctly reflected in the dataverse collection.
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.