Uploaded image for project: 'CloverDX'
  1. CloverDX
  2. CLO-15739

DataService path parameters - support for regular expressions

    XMLWordPrintable

    Details

    • Story Points:
      3
    • QA Testing:
      UNDECIDED
    • Sprint:
      Green Sprint 79, Green Sprint 80

      Description

      With update of spring-web library, parsing of path parameters in DataServices changed its behaviour. It does not match parameter if value contains slash ('/').

      So for example service with path:

      http://cloverserverurl:8080/clover/data-service/example/html/{filename} 

      used to match for

      http://virt-alpha:8087/clover/data-service/example/html/img/logo.png 

      but it does not match since 5.1.

      As this is standard behaviour, we do not want to change it. But, there is an option to use regular expression in path parameters to influence matching of URL.

      If user wants path parameter to accept even slash (or use any other pattern matching functionality on parameter, he can write path parameter in URL like this:

      {filename:.+} 

      such parameter will allow to accept any character (even slash).

      It works server side even with 5.1, but we need to implement support for this in Designer. Endpoint Configuration tab will respect ':' in path parameter and will use only everything before ':' as parameter name.

      Currently user has to manually update parameter name in rjob source code.

      Seems like SwaggerUI used for testing and documentation already supports it.

      • implement support in Designer (Endpoint configuration)
      • document using of regular expression in path parameters
      • update DataServices example to use regular expression
      • create test for parsing of path parameters using regular expression

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                botkar Roland Botka
                Reporter:
                sedlacekj Jan Sedlacek
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: