Uploaded image for project: 'Magnolia REST Framework'
  1. Magnolia REST Framework
  2. MGNLREST-361

Configuration property to control the depth of referenced nodes


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 3.0.0, 2.2.16
    • 2.2.12
    • None
    • None
    • Yes
    • Yes
    • DevX 28
    • 3

      Currently it is possible to configure the referenceDepth in rest endpoints so we can limit the number of references (in depth) that are resolved. However, it is not possible to configure the depth of the referenced nodes as the property depth does in the rest endpoint configuration. The existing implementation returns the referenced nodes up to the configured referenceDepth but it is also returning all their children. This is happening because resolve method is always passing a value of -1: https://git.magnolia-cms.com/projects/MODULES/repos/rest/browse/magnolia-rest-content-delivery/src/main/java/info/magnolia/rest/delivery/jcr/v2/JcrDeliveryEndpoint.java#354

      In certain cases, users wants a specific depth for the returned "root" nodes but a different depth for the referenced nodes. Therefore, this is to ask for a configuration property that controls the depth of the referenced nodes instead of using the hardcoded value of -1

      In some cases when referenced nodes having big tree behind, the reference resolver resolved a very big tree in response which may cause both performance issue and un-responding to front-end side when multiple users calling the same request.

        Acceptance criteria

              oanh.thai Oanh Thai Hoang
              jayala Jonathan Ayala
              1 Vote for this issue
              8 Start watching this issue

                Work Started:

                  Bug DoR
                  Task DoD

                    Original Estimate - Not Specified
                    Not Specified
                    Remaining Estimate - Not Specified
                    Not Specified
                    Time Spent - 2d 1h
                    2d 1h