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

JcrReferenceResolverDefinition to allow specify properties to resolve

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Neutral
    • None
    • None
    • None
    • None

    Description

      Consider following:

      Page tree

      home
        |_child-1
          |_sub-child-2
      

      home page dialog property

      pageLink:
        $type: pageLinkField
      

      rest

      class: info.magnolia.rest.delivery.jcr.v2.JcrDeliveryEndpointDefinition
      workspace: website
      
      references:
        - name: pageLink
          propertyName: pageLink
          referenceResolver:
            class: info.magnolia.rest.reference.jcr.JcrReferenceResolverDefinition
            targetWorkspace: website
      

      When on home I link pageLink to child-1 and all rest for home I will get whole pageLink resolved including all sub nodes - sub-child-2.

      In this scenraio I want only child-1 as I want it's e.g. path.

      It would be nice If I could specify on resolver reference properties which I want to be resolved.

      E.g.

      references:
        - name: pageLink
          propertyName: pageLink
          referenceResolver:
            class: info.magnolia.rest.reference.jcr.JcrReferenceResolverDefinition
            targetWorkspace: website
            properties:
              - @path
              - title
      

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                bstaryga Bartosz Staryga
                Votes:
                6 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:

                  Checklists

                    Task DoD