diff --git a/src/main/java/com/michelin/ns4kafka/controller/connect/ConnectClusterController.java b/src/main/java/com/michelin/ns4kafka/controller/connect/ConnectClusterController.java index 43930cf3..91e5aad6 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/connect/ConnectClusterController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/connect/ConnectClusterController.java @@ -67,8 +67,10 @@ public List list(String namespace, @QueryValue(defaultValue = "* * @param namespace The namespace * @param connectCluster The name * @return A Kafka Connect cluster + * @deprecated use list(String, String name) instead. */ @Get("/{connectCluster}") + @Deprecated(since = "1.12.0") public Optional get(String namespace, String connectCluster) { return connectClusterService.findByNameWithOwnerPermission(getNamespace(namespace), connectCluster); } diff --git a/src/test/java/com/michelin/ns4kafka/controller/ConnectClusterControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/ConnectClusterControllerTest.java index d3612bce..b31c63de 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/ConnectClusterControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/ConnectClusterControllerTest.java @@ -118,6 +118,7 @@ void shouldListConnectClusterWithNameParameter() { } @Test + @SuppressWarnings("deprecation") void shouldGetConnectClusterWhenEmpty() { Namespace ns = Namespace.builder() .metadata(Metadata.builder() @@ -136,6 +137,7 @@ void shouldGetConnectClusterWhenEmpty() { } @Test + @SuppressWarnings("deprecation") void shouldGetConnectCluster() { Namespace ns = Namespace.builder() .metadata(Metadata.builder()