Uploaded image for project: 'REST Client'
  1. REST Client
  2. MGNLRESTCL-97

Instance-safe resolution of magnolia-base-path

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • None

      Installing Magnolia with CLI means a neat single folder for all light dev code

      magnolia.resources.dir=${magnolia.home}/../../../light-modules

      for both instances, author and public.

      Yet, this poses an issue how to reference a rest endpoint like this:

      https://git.magnolia-cms.com/projects/MODULES/repos/rest-client/commits/8de6368cc972f453064e36e959e4107c1fd250f0#declarative-rest-demo/restEndpoints/countries.yaml

      from a REST client definition like this one:

      https://git.magnolia-cms.com/projects/MODULES/repos/rest-client/commits/8de6368cc972f453064e36e959e4107c1fd250f0#declarative-rest-demo/restClients/magnolia-stuff.yaml

      where one feels the itching to replace the "rest" part of the path with either "magnoliaAuthor" or "magnoliaPublic", depending on which instance will in the end do the querying.

       

      The user could at least use:

      1) a path template, sth like

      baseUrl: 'http://localhost:8080/{magnoliaInstance}/.rest'

      and then, in the template script, resolve the value by using a context property.

       

      2) a preconfigured (default) instance resolver like

      baseUrl: 'http://localhost:8080/{instanceResolver}/.rest'

       with no extra need to care for this in the template script.

       

       

        Acceptance criteria

              Unassigned Unassigned
              mdrapela Martin Drápela
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: