code: private void computePathIfNeeded() {
      if (path == null) {
        // This will make sure path array has one extra element in the end, where we will store the version string.
        // Pass -1 because otherwise split() removes any trailing empty strings.
        path = (url + "/").split("/", -1);
  
        assert path[0].isEmpty() && path.length >= 3;
  
        String ver = path[1].toUpperCase();
        if (ver.equals("EXPERIMENTAL")) ver = ((Integer) SchemaServer.getExperimentalVersion()).toString();
        if (ver.equals("LATEST")) ver = ((Integer) SchemaServer.getLatestOrHighestSupportedVersion()).toString();
  
        // Old clients (h2o-2) tend to append .json suffix to the endpoint's name -- fixing that
        if (path[2].endsWith(".json"))
          path[2] = path[2].substring(0, path[2].length() - 5);
  
        path[1] = method;
        path[path.length - 1] = ver;
      }
    }
docs: Convert the provided HTTP_method/URL pair into a "path" suitable for lookups in the RouteTree. This is mostly
  equivalent to url.split("/"), with a few caveats:
  - if the url contains "special" version (LATEST/EXPERIMENTAL), it will be replaced with its numeric value;
  - the order of url chunks is modified: the version is always moved to the end, its place taken by http_method;
  Examples:
  "GET", "/3/Models/{model_id}"  =>  ["", "GET", "Models", "{model_id}", "3"]
  "GET", "/"  =>  ["", "GET", ""]
  First chunk is always "" because that is the root of the RouteTree.