[PAGES-1557] As a frontend developer I want to get page template definitions by path Created: 14/Dec/23 Updated: 02/Feb/24 |
|
| Status: | Discovery |
| Project: | Magnolia pages module |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Story | Priority: | Neutral |
| Reporter: | Canh Nguyen | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | 3d | ||
| Original Estimate: | Not Specified | ||
| 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: | |||||||||||||
| Epic Link: | SPA Editor Backlog | ||||||||||||
| T-Shirt Size: | Medium | ||||||||||||
| Team: | |||||||||||||
| Work Started: | |||||||||||||
| Description |
| Comments |
| Comment by Christopher Zimmermann [ 14/Dec/23 ] | |||||||||||||||||||||||||||
|
Can you please provide more detail about the use case? I don't understand "In a SPA project, it's required to fetch definitions by path to create JS field forms. ". | |||||||||||||||||||||||||||
| Comment by Canh Nguyen [ 18/Dec/23 ] | |||||||||||||||||||||||||||
|
czimmermann I've updated the description. | |||||||||||||||||||||||||||
| Comment by Canh Nguyen [ 20/Dec/23 ] | |||||||||||||||||||||||||||
|
This new endpoint uses jackson to serialize TemplateDefinition, so it merely converts TemplateDefinition to JSON without processing data. Comparison
Template Definition v2 APIs
| |||||||||||||||||||||||||||
| Comment by Christopher Zimmermann [ 20/Dec/23 ] | |||||||||||||||||||||||||||
|
Thank you! Looks pretty good | |||||||||||||||||||||||||||
| Comment by Christopher Zimmermann [ 04/Jan/24 ] | |||||||||||||||||||||||||||
|
I have a small discussion point. Typically for a REST API I would expect the url to take the templateId in the path - like: /{templateId} But I guess there are good reasons for the way you described above. The main usecase is to get the template for a specific path. And the way you described works more like the template-annotations and delivery APIs. — Also a question - why does v2 "Returns nested template IDs only. SPAs need to fetch nested template by ID.". Maybe I dont understand the usecase properly... but wouldnt a developer want to get the definitions for the page, the area, and the available components - all in one go? | |||||||||||||||||||||||||||
| Comment by Christopher Zimmermann [ 04/Jan/24 ] | |||||||||||||||||||||||||||
|
What is the usage for "Find the closest parent definition by a given path and node type"? |