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

Cannot decorate the delivery endpoint

    XMLWordPrintable

Details

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

    Description

      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.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

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