code: public static String sanitizeRequestMappingPattern(String requestMappingPattern) {
      String result = requestMappingPattern;
      //remove regex portion '/{businessId:\\w+}'
      result = result.replaceAll("\\{([^}]+?):([^/{}]|\\{[\\d,]+})+}", "{$1}");
      return rootPathWhenEmpty(result);
    }
docs: Gets a uri friendly path from a request mapping pattern.
  Typically involves removing any regex patterns or || conditions from a spring request mapping
  This method will be called to resolve every request mapping endpoint.
  A good extension point if you need to alter endpoints by adding or removing path segments.
  Note: this should not be an absolute  uri
  
  @param requestMappingPattern request mapping pattern
  @return the request mapping endpoint