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

Cannot decorate the delivery endpoint

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 2.0
    • 2.0
    • None
    • None

      Attempts to decorate the delivery endpoint fail.
      Decoration is very important since only one instance of the delivery endpoint can be created. Decoration is the mechanism by which each module can end the endpoint configurations that they require.

      Attempted configuration:

      Original config in module "rest-test":
      /light-modules/rest-test/restEndpoints/rest1.yaml

      class: info.magnolia.rest.delivery.jcr.v1.JcrDeliveryEndpointDefinition
      params:
        contacts:
          workspace: contacts
          nodeTypes:
            0: mgnl:contact
      
        # tours:
        #   workspace: tours
      

      Attempt at decoration:
      /light-modules/add-endpoints/decorations/rest-test/restEndpoints/rest1.yaml

      params:
        tours:
          workspace: tours
      

      (See attachment for full configuration)

      Results in

      • In the decorations app - the "delivery" endpoint is visible, but cannot be expanded.
      • In the problems view "Illegal state: Only support maps with String keys 0 in {0=mgnl:contact}
      • Requests to /.rest/delivery/tours/v1/ result in response No workspace-params entry for endpoint prefix 'tours' and an exception in the log.
      • Requests to /.rest/delivery/contacts/v1/ work fine.

      Note:

      If I wrap the nodetypes in the original with quotes, then the definitions app displays the endpoint properly and I can expand it, there are no problems in the problems view, but the actual requests still fail with exceptions.

        Acceptance criteria

              mgeljic Mikaël Geljić
              czimmermann Christopher Zimmermann
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - 4.5h Original Estimate - 4.5h
                    4.5h
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 1d 7h
                    1d 7h