code: private static String trimGroupOrNull(String apiVersion) {
      if (apiVersion != null && apiVersion.contains("/")) {
        String[] versionParts = apiVersion.split("/");
        return versionParts[0];
      }
      return null;
    }
docs: Separates apiGroupName for apiGroupName/apiGroupVersion combination.
  @param apiVersion  The apiGroupVersion or apiGroupName/apiGroupVersion combo.
  @return            Just the apiGroupName part without the apiGroupName, or null if no separator is found.