Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
Description
Currently, I think the serialization of component rendering URLs for component items is odd.
for example if from http://localhost:8080/site/resourceapi I get (part of the response)
"components": [ { "id": "r60_r1_r2_r2_r1", "name": "banner1-ul", "type": "org.hippoecm.hst.demo.components.Banner", "label": "Banner1Ul", "_meta": { "params": { "ExampleComponentWindowCreationFilter.hide": "true", "testParamFromMount": "testValue", "param1": "value1", "param2": "value2" } }, "_links": { "componentRendering": "\/site\/resourceapi?_hn:type=component-rendering&_hn:ref=r60_r1_r2_r2_r1" } },
and then call the component rendering URL http://localhost:8080/site/resourceapi?_hn:type=component-rendering&_hn:ref=r60_r1_r2_r2_r1, I get
{ "id": "r60_r1_r2_r2_r1", "_meta": { "definitionId": "hst:pages\/home\/body-hst:components\/bodyhome\/contenthst:components\/bodyhome\/content\/container-with-skipped-bannershst:components\/bodyhome\/content\/container-with-skipped-banners\/banner1-ul", "params": { "ExampleComponentWindowCreationFilter.hide": "true", "testParamFromMount": "testValue", "param1": "value1", "param2": "value2" } }, "_links": { "self": "http:\/\/localhost:8080\/site\/resourceapi", "site": "http:\/\/localhost:8080\/site\/" }, "containers": [ { "components": [ { "id": "r60_r1_r2_r2_r1", "name": "banner1-ul", "type": "org.hippoecm.hst.demo.components.Banner", "label": "Banner1Ul", "_meta": { "params": { "ExampleComponentWindowCreationFilter.hide": "true", "testParamFromMount": "testValue", "param1": "value1", "param2": "value2" } }, "_links": { "componentRendering": "\/site\/resourceapi?_hn:type=component-rendering&_hn:ref=r60_r1_r2_r2_r1" } } ] } ] }
This does not make sense to me. The container item does not have containers, let alone that it has itself as container. Instead, the component rendering URL should return
{ "id": "r60_r1_r2_r2_r1", "name": "banner1-ul", "type": "org.hippoecm.hst.demo.components.Banner", "label": "Banner1Ul", "_meta": { "params": { "ExampleComponentWindowCreationFilter.hide": "true", "testParamFromMount": "testValue", "param1": "value1", "param2": "value2" } }, "_links": { "componentRendering": "\/site\/resourceapi?_hn:type=component-rendering&_hn:ref=r60_r1_r2_r2_r1" }
if you ask me (and potentially also content if there was some content contributed to the component item as well)
Attachments
Issue Links
- is a result of
-
HSTTWO-4227 [SPA++] Replace GREB API based Page Model pipeline by HST PageModelPipeline
- Closed
- relates to
-
HSTTWO-4268 Let the page model api serialize by default the entire page component hierarchy instead of only containers and items
- Closed