-
Notifications
You must be signed in to change notification settings - Fork 531
update dvObject featured item response #11552
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
Merged
ofahimIQSS
merged 15 commits into
develop
from
11550-update-dv-object-featured-items-response
Jun 23, 2025
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
04e09b7
update dvObject featured item response
stevenwinship 254941c
fix doc
stevenwinship 784a214
fix flyway script name
stevenwinship c56b6a8
add checks for restricted files and unpublished dataverse and dataset
stevenwinship c6493b8
fix unit test
stevenwinship dce46ba
fix it test by piblishing dataverse and dataset
stevenwinship 76b2c89
Update src/main/java/edu/harvard/iq/dataverse/util/json/JsonPrinter.java
stevenwinship 75eb4e4
Merge branch 'develop' into 11550-update-dv-object-featured-items-res…
stevenwinship 0568289
fix datafile not found error and added tests
stevenwinship cf690d3
add comments to new IT tests
stevenwinship 458042c
add dvObject display name to json
stevenwinship c6b1bcd
add new tests
stevenwinship 5d7e8a5
rename flyway script from 6.6.0.1 to 6.6.0.2
stevenwinship 5dd7ce8
re-work the deleteion of datafile featured items when publishing dataset
stevenwinship 9546ea3
fix tests by setting publication date on datafile
stevenwinship File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1218,9 +1218,9 @@ The ``file`` parameter must be specified for each image we want to attach to fea | |
|
|
||
| The ``id`` parameter must be ``0`` for new items or set to the item's identifier for updates. The ``fileName`` parameter should be empty to exclude an image or match the name of a file sent in a ``file`` parameter to set a new image. ``keepFile`` must always be set to ``false``, unless it's an update to a featured item where we want to preserve the existing image, if one exists. | ||
|
|
||
| The ``type`` and ``dvObject`` parameters are optional. These allow you to link the featured item to a Dataverse, Dataset, or Datafile. | ||
| The ``dvObject`` can be passed as the id or the persistent identifier and the ``type`` must be passed as either "dataverse", "dataset", or "datafile", depending on the type of object. | ||
| If no ``dvObject`` is passed the ``type`` will default to "custom" designating no linked object. | ||
| The ``type`` and ``dvObjectIdentifier`` parameters are optional. These allow you to link the featured item to a Dataverse, Dataset, or Datafile. | ||
| The ``dvObjectIdentifier`` can be passed as the alias, id, or the persistent identifier and the ``type`` must be passed as either "dataverse", "dataset", or "datafile", depending on the type of object. | ||
| If no ``dvObjectIdentifier`` is passed the ``type`` will default to "custom" designating no linked object. | ||
|
|
||
| Note that any existing featured item not included in the call with its associated identifier and corresponding properties will be removed from the collection. | ||
|
|
||
|
|
@@ -1250,7 +1250,7 @@ The following example creates two featured items, with an image and a dataset as | |
| -F "keepFile=false" -F "keepFile=false" \ | ||
| -F "file=@$SECOND_ITEM_IMAGE_FILENAME" \ | ||
| -F "type=" -F "type=@$SECOND_ITEM_TYPE" \ | ||
| -F "dvObject=" -F "dvObject=@$SECOND_ITEM_DVOBJECT" \ | ||
| -F "dvObjectIdentifier=" -F "dvObjectIdentifier=@$SECOND_ITEM_DVOBJECT" \ | ||
| "$SERVER_URL/api/dataverses/$ID/featuredItems" | ||
|
|
||
|
|
||
|
|
@@ -1267,7 +1267,7 @@ The fully expanded example above (without environment variables) looks like this | |
| -F "keepFile=false" -F "keepFile=false" \ | ||
| -F "[email protected]" \ | ||
| -F "type=" -F "type=dataset" \ | ||
| -F "dvObject=" -F "dvObject=doi:ZZ7/MOSEISLEYDB94" \ | ||
| -F "dvObjectIdentifier=" -F "dvObjectIdentifier=doi:ZZ7/MOSEISLEYDB94" \ | ||
| "https://demo.dataverse.org/api/dataverses/root/featuredItems" | ||
|
|
||
| The following example creates one featured item and updates a second one, keeping the existing image it may have had but removes the dataset link and defaults the type to "custom": | ||
|
|
||
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
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
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
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
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
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
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
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
File renamed without changes.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.