core/src/main/java/net/typedrest/URIUtils.java
@SneakyThrows
    public static URI ensureTrailingSlash(URI uri) {
        URIBuilder builder = new URIBuilder(uri);
        if (!builder.getPath().endsWith("/")) {
            builder.setPath(builder.getPath() + "/");
        }
        return builder.build();
    }
@SneakyThrows
    public static URI ensureTrailingSlash(URI uri) {
        URIBuilder builder = new URIBuilder(uri);
        if (!builder.getPath().endsWith("/")) {
            builder.setPath(builder.getPath() + "/");
        }
        return builder.build();
    }
Adds a trailing slash to the URI if it does not already have one.

@param uri The original URI.
@return The URI with appended slash.