diff --git a/README.md b/README.md index efeab0264..ff957b518 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ Add the following to your `build.gradle` or `build.gradle.kts` file: ```groovy dependencies { - implementation("com.vonage:server-sdk:9.11.0") + implementation("com.vonage:server-sdk:9.12.0") } ``` @@ -94,7 +94,7 @@ Add the following to the `` section of your `pom.xml` file: com.vonage server-sdk - 9.11.0 + 9.12.0 ``` diff --git a/pom.xml b/pom.xml index 8a1de7fb0..f97797edc 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.vonage server-sdk - 9.11.0 + 9.12.0 Vonage Java Server SDK Java client for Vonage APIs diff --git a/src/main/java/com/vonage/client/HttpWrapper.java b/src/main/java/com/vonage/client/HttpWrapper.java index 5e66ae67a..bd9c97687 100644 --- a/src/main/java/com/vonage/client/HttpWrapper.java +++ b/src/main/java/com/vonage/client/HttpWrapper.java @@ -44,7 +44,7 @@ public class HttpWrapper { private static final String CLIENT_NAME = "vonage-java-sdk", - CLIENT_VERSION = "9.11.0", + CLIENT_VERSION = "9.12.0", JAVA_VERSION = System.getProperty("java.version"), USER_AGENT = String.format("%s/%s java/%s", CLIENT_NAME, CLIENT_VERSION, JAVA_VERSION); diff --git a/src/main/java/com/vonage/client/conversations/ConversationsClient.java b/src/main/java/com/vonage/client/conversations/ConversationsClient.java index 7fa56e7fe..5cd23d01f 100644 --- a/src/main/java/com/vonage/client/conversations/ConversationsClient.java +++ b/src/main/java/com/vonage/client/conversations/ConversationsClient.java @@ -71,7 +71,11 @@ class Endpoint extends DynamicEndpoint { .responseExceptionType(ConversationsResponseException.class) .requestMethod(method).wrapper(wrapper).pathGetter((de, req) -> { String base = de.getHttpWrapper().getHttpConfig().getApiBaseUri(); - return base + pathGetter.apply(req); + String path = base + pathGetter.apply(req); + // The API gateway stopped routing trailing-slash paths to their + // canonical form (broke ~2026-06-06), so strip a trailing slash + // from any Conversations route that would otherwise end in one. + return path.endsWith("/") ? path.substring(0, path.length() - 1) : path; }) ); } diff --git a/src/test/java/com/vonage/client/conversations/ConversationsClientTest.java b/src/test/java/com/vonage/client/conversations/ConversationsClientTest.java index 9983d67e2..22416f144 100644 --- a/src/test/java/com/vonage/client/conversations/ConversationsClientTest.java +++ b/src/test/java/com/vonage/client/conversations/ConversationsClientTest.java @@ -646,7 +646,7 @@ protected HttpMethod expectedHttpMethod() { @Override protected String expectedEndpointUri(ListConversationsRequest request) { - return "/v1/conversations/"; + return "/v1/conversations"; } @Override @@ -748,7 +748,7 @@ protected HttpMethod expectedHttpMethod() { @Override protected String expectedEndpointUri(Conversation request) { - return "/v1/conversations/"; + return "/v1/conversations"; } @Override @@ -1176,7 +1176,7 @@ protected HttpMethod expectedHttpMethod() { @Override protected String expectedEndpointUri(ListMembersRequest request) { - return "/v1/conversations/"+request.conversationId+"/members/"; + return "/v1/conversations/"+request.conversationId+"/members"; } @Override @@ -1325,7 +1325,7 @@ protected HttpMethod expectedHttpMethod() { @Override protected String expectedEndpointUri(Member request) { - return "/v1/conversations/"+request.getConversationId()+"/members/"; + return "/v1/conversations/"+request.getConversationId()+"/members"; } @Override @@ -1670,7 +1670,7 @@ protected HttpMethod expectedHttpMethod() { @Override protected String expectedEndpointUri(ListEventsRequest request) { - return "/v1/conversations/"+request.conversationId+"/events/"; + return "/v1/conversations/"+request.conversationId+"/events"; } @Override @@ -1734,7 +1734,7 @@ protected HttpMethod expectedHttpMethod() { @Override protected String expectedEndpointUri(Event request) { - return "/v1/conversations/"+request.conversationId+"/events/"; + return "/v1/conversations/"+request.conversationId+"/events"; } @Override