[MGNLREST-87] Simplify output of the NodeEndpoint Created: 27/Mar/17  Updated: 10/Apr/17  Resolved: 10/Apr/17

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

Type: New Feature Priority: Major
Reporter: Mikaël Geljić Assignee: Hieu Nguyen Duc
Resolution: Won't Do Votes: 0
Labels: rest
Remaining Estimate: 2d 1h
Time Spent: 3d 7h
Original Estimate: 6d

Issue Links:
Cloners
Template:
Acceptance criteria:
Empty
Sprint: Saigon 89, Saigon 90
Story Points: 5

 Description   

Upon successful research and spike done in DEV-466, we proceed with this.

Envisioning a new version of the JCR node endpoint to return content in a more compact format.

For GET operations: take a query parameter named verbose, defaults to false.
If true, return same output as currently, with all JCR property metadata.
If false, return a compact form, with common representation for number/date types.

(We can omit links in a first step, but good to try it out nonetheless)



 Comments   
Comment by Mikaël Geljić [ 10/Apr/17 ]

Upon discussion w/ pmundt, we decided to decline this effort, in its current shape:

The "technical output" produced by v1 NodeEndpoint can be reused as input, for both #createNode or #updateNode. V2 makes this inconsistent (was proven by Philip's latest integration-tests, in particular NodeEndpointTest#verifyBasicNodeCRUDOperationUsingJSON). The short format cannot be reused for such operations. Therefore v1 cannot be fully deprecated.

Instead, we will create a new endpoint (name to be determined), producing only JSON, only in simple-format, and without the write operations. Implementation-wise, let's see what we can do (in spite of BL-376); one wish is to use plain JAX-RS entity providers for this: `MessageBodyWriter` instead of the `RepositoryMarshaller`. This will be carried over in a follow-up ticket.

Generated at Mon Feb 12 06:56:28 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.