[MGNLREST-216] Customize content format and perform business logic on server Created: 18/Nov/19 Updated: 25/Apr/23 |
|
| Status: | Open |
| Project: | Magnolia REST Framework |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Story | Priority: | Major |
| Reporter: | Christopher Zimmermann | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| 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)
|
||||||||
| Release notes required: |
Yes
|
||||||||
| Documentation update required: |
Yes
|
||||||||
| Date of First Response: | |||||||||
| Description |
|
User story:
Notes: See: SPA - How to match content to API of JS components
Acceptance criteria:
Notes: If we added GraphQL support - it would be likely be a little file living next to each component to specify the props to get and their shape. Therefore, without GraphQL an alternative would be to support a "JSON transformer file", or a component model, which would specify or remap the default content, and supply it as a new JSON format. Possibly this could also be supplied as an FTL file to provide "templating the JSON response". |
| Comments |
| Comment by Marc Johnen [ 05/Jan/21 ] |
|
I think this is also related to MGNLREST-188. The way I see it the resolvers of the JcrDeliveryEndpoint are not powerful enough. Minimum they should have access to the node a property is coming from. |
| Comment by Christopher Zimmermann [ 05/Jan/21 ] |
|
marc.johnen could you provide any concrete examples of what you would want to be able to get and why? What do you mean by "access to the node", can you not already get all the properties you want to get from that node when it is resolved? Or are some not available? |
| Comment by Marc Johnen [ 07/Jan/21 ] |
|
I'm currently migrating a project with a custom implementation of a react frontend to the extended spa editor. Also the standard structure nodes are mapped is difficult to handle in react, I guess an array would be more suitable. "00": { ... }, "01": { ... }, "@nodes": [ "00", "01" ] I would also wish for some mechanism to handle i18n in json (see https://groups.google.com/a/magnolia-cms.com/g/user-list/c/sTtp8N7R2Hw). The link above "SPA - How to match content to API of JS components" does not work btw.. |
| Comment by Marc Johnen [ 25/Jan/21 ] |
|
Also the filter of the JCRDeliveryEndpoint quickly reaches it's limit. See https://groups.google.com/a/magnolia-cms.com/g/user-list/c/7-FLrvKnRyE/m/wbV0xy5fDAAJ |