[MGNLREST-108] REST Queries - Expand references Created: 01/Sep/17  Updated: 23/Oct/17  Resolved: 18/Oct/17

Status: Closed
Project: Magnolia REST Framework
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0

Type: Story Priority: Neutral
Reporter: Christopher Zimmermann Assignee: Sang Ngo Huu
Resolution: Fixed Votes: 0
Labels: to-specify
Remaining Estimate: 0d
Time Spent: 5d 3h
Original Estimate: 5.5h

Attachments: File expanded_json.json     Zip Archive rest-content-delivery.zip    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Epic Link: REST References
Sprint: Saigon 115, Saigon 116, Saigon 117, Saigon 118
Story Points: 5

 Description   

User story:
As a Developer, I can request a reference to be expanded , so that I only need to make one request to get all of the information I need.

Capabilities:

  • When an item refers to another item, I can retrieve that referenced item in the same request.
  • The reference item info can be "shaped" in the same way as the main item - requesting specific fields, resolving links etc.
  • I can request how many levels of expansion to perform, default is 0.

To Specify: Format of expanded content.
There are different opinions as to how to best include expanded content. Two options to evaluate:

  • Content is expanded "in place" - so right where a linked categories UUID would have been, now there is an object containing the categories contents.
  • Content is appended to the end of the response. So an additional category object is included at the end of the response.


 Comments   
Comment by Dai Ha [ 23/Oct/17 ]

Verified with build magnolia-enterprise-pro-demo-bundle-5.6-20171020.095353-177-tomcat-bundle.
Sample:

  1. Config & Sample response: in attachment
  2. Request: http://localhost:8080/magnoliaAuthor/.rest/delivery/stories/v1/stories-demo/lost-and-found-in-swiss-alps
Generated at Mon Feb 12 06:56:41 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.