-
Notifications
You must be signed in to change notification settings - Fork 500
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
Data Deposit API: Contributor Type can be changed #973
Comments
The good news is that if you try to use "SmurfFunder" rather than "Funder" with the native API you get an error:
Ideally, the API would be able to report back the valid values so native API users doesn't have to look them up in the docs. I couldn't quickly figure out how to make the native API do this (we could open a new ticket for this). Here's the JSON I used to tickle the validation message above:
The SWORD API (Data Deposit API) uses a different code path than the native API. It uses the
See also #899 (comment) where this bug was first described. |
@pdurbin I think this is the same type of issue you had with the duplicate subjects (at least I'm assuming your code was written in the same way, creating a new CVV, instead of looking it up. Can you check if this is the issue? |
@scolapasta the bug would be in the importXML method developed by @landreev in #572 but sure, I can take a quick look. You want validation to happen in the importXML method and in the "native" API (must already be in there somewhere)? Not centralized at all? |
@scolapasta I took at quick look the importXML method @landreev wrote for #572 but it's complicated and since he's saying "Do note that we are junking this implementation of foreign metadata import" at #572 (comment) (in favor or the code @ekraffmiller will be working on for the "Batch API" presumably) I'm going to give this ticket to @ekraffmiller to think about as she works on an alternative to the importXML method. The API spreadsheet says the Batch API is for beta 10 so I'll change the milestone as well. |
This validation check is done in the JsonParser, so bug will be fixed when we switch dcterms import to use JsonParser. |
#rtreacy - is this fixed now that that import goes through the Json? |
The new json based importXML has been incorporated into ContainerManageImpl and CollectionDepositManagerImpl. |
Using the Data Deposit API, a metadata field with a controlled vocabulary can be changed without an error being thrown. For example, the contributor type field has funder as an option. In the API you can change it from funder to smurffunder and it will save the dataset with that.
The text was updated successfully, but these errors were encountered: