Skip to content
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

[DS-4084] - Relationships should link to Items via REST API #2456

Merged

Conversation

benbosman
Copy link
Member

@benbosman benbosman commented Jun 25, 2019

This commit is the last step to support https://jira.duraspace.org/browse/DS-4084
Using the commits in this PR, the leftId and rightId properties are removed.

This can be merged now since DSpace/dspace-angular#408 is merged

This PR will result in a relationship similar to e.g.:

{
  "id": 2095,
  "relationshipTypeId": 0,
  "leftPlace": 0,
  "rightPlace": 0,
  "type": "relationship",
  "_links": {
    "relationshipType": {
      "href": "https://dspace7-entities.atmire.com/rest/api/core/relationshiptypes/12"
    },
    "self": {
      "href": "https://dspace7-entities.atmire.com/rest/api/core/relationships/2095"
    },
    "leftItem": {
      "href": "https://dspace7-entities.atmire.com/rest/api/core/items/96715576-3748-4761-ad45-001646632963"
    },
    "rightItem": {
      "href": "https://dspace7-entities.atmire.com/rest/api/core/items/6eccc640-ca98-486b-9895-723117398a50"
    }
  }
}

@benbosman benbosman added component: configurable entities Related to Configurable Entities feature interface: REST API v7+ REST API for v7 and later (dspace-server-webapp module) labels Jun 25, 2019
Copy link
Contributor

@AlexanderS AlexanderS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. It only removes deprecated information from the REST json response for relationships and adjust the tests to check the new links.

Copy link
Contributor

@paulo-graca paulo-graca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me. I've just performed some tests and everything worked as expected. Thank you @benbosman !

@benbosman
Copy link
Member Author

This PR has received 2 approvals, from the people who did volunteer to review it.
Thanks for the approvals, I'm merging the PR

@benbosman benbosman merged commit e2c1ab5 into DSpace:master Jul 9, 2019
@benbosman benbosman deleted the DS-4084_remove-leftid-rightid-relationship branch March 13, 2020 16:07
@tdonohue tdonohue added this to the 7.0beta1 milestone Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: configurable entities Related to Configurable Entities feature interface: REST API v7+ REST API for v7 and later (dspace-server-webapp module)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants