Interface RestAPIVersion<T extends RestAPIVersion<T>>

    • Method Detail

      • getURLVersionPrefix

        String getURLVersionPrefix()
        Returns the URL version prefix (e.g. "v1") for this version.
        Returns:
        URL version prefix
      • isDefaultVersion

        boolean isDefaultVersion()
        Returns whether this version is the default REST API version.
        Returns:
        whether this version is the default
      • isStableVersion

        boolean isStableVersion()
        Returns whether this version is considered stable.
        Returns:
        whether this version is stable
      • getLatestVersion

        static <E extends RestAPIVersion<E>> E getLatestVersion​(Collection<E> versions)
        Accept versions and one of them as a comparator, and get the latest one.
        Returns:
        latest version that implement RestAPIVersion interface>