diff --git a/src/main/java/com/michelin/ns4kafka/controller/quota/ResourceQuotaController.java b/src/main/java/com/michelin/ns4kafka/controller/quota/ResourceQuotaController.java index 0037f4f8..25a3a707 100644 --- a/src/main/java/com/michelin/ns4kafka/controller/quota/ResourceQuotaController.java +++ b/src/main/java/com/michelin/ns4kafka/controller/quota/ResourceQuotaController.java @@ -160,9 +160,11 @@ public HttpResponse bulkDelete(String namespace, @QueryValue(defaultValue * @param name The resource quota * @param dryrun Is dry run mode or not? * @return An HTTP response + * @deprecated use {@link #bulkDelete(String, String, boolean)} instead. */ @Delete("/{name}{?dryrun}") @Status(HttpStatus.NO_CONTENT) + @Deprecated(since = "1.13.0") public HttpResponse delete(String namespace, String name, @QueryValue(defaultValue = "false") boolean dryrun) { Optional resourceQuota = resourceQuotaService.findByName(namespace, name); diff --git a/src/test/java/com/michelin/ns4kafka/controller/ResourceQuotaControllerTest.java b/src/test/java/com/michelin/ns4kafka/controller/ResourceQuotaControllerTest.java index 6e3f21ee..ad426b39 100644 --- a/src/test/java/com/michelin/ns4kafka/controller/ResourceQuotaControllerTest.java +++ b/src/test/java/com/michelin/ns4kafka/controller/ResourceQuotaControllerTest.java @@ -321,6 +321,7 @@ void shouldApplyUpdated() { } @Test + @SuppressWarnings("deprecation") void shouldNotDeleteQuotaWhenNotFound() { when(resourceQuotaService.findByName("test", "quota")).thenReturn(Optional.empty()); HttpResponse actual = resourceQuotaController.delete("test", "quota", false); @@ -329,6 +330,7 @@ void shouldNotDeleteQuotaWhenNotFound() { } @Test + @SuppressWarnings("deprecation") void shouldNotDeleteQuotaWhenDryRun() { ResourceQuota resourceQuota = ResourceQuota.builder() .metadata(Metadata.builder() @@ -345,6 +347,7 @@ void shouldNotDeleteQuotaWhenDryRun() { } @Test + @SuppressWarnings("deprecation") void shouldDeleteQuota() { ResourceQuota resourceQuota = ResourceQuota.builder() .metadata(Metadata.builder()