Skip to content

Commit d91001d

Browse files
committed
fix: remove @notempty on List (unsupported by HV) and correct test expectations #35203
1 parent 2817123 commit d91001d

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

dotCMS/src/main/java/com/dotcms/rest/api/v1/maintenance/DeleteContentletsForm.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import com.fasterxml.jackson.annotation.JsonProperty;
77
import io.swagger.v3.oas.annotations.media.Schema;
88

9-
import javax.validation.constraints.NotEmpty;
109
import java.util.List;
1110

1211
/**
@@ -19,7 +18,6 @@
1918
public class DeleteContentletsForm extends Validated {
2019

2120
@JsonProperty("identifiers")
22-
@NotEmpty(message = "identifiers is required and must not be empty")
2321
@Schema(
2422
description = "List of contentlet identifiers. All language siblings of each "
2523
+ "identifier will be permanently destroyed.",

dotcms-integration/src/test/java/com/dotcms/rest/api/v1/maintenance/MaintenanceResourceIntegrationTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,13 @@ public void test_deleteContentlets_nullForm_throwsBadRequest() {
329329
resource.deleteContentlets(request, mockResponse, null);
330330
}
331331

332-
@Test(expected = ValidationException.class)
333-
public void test_deleteContentlets_emptyIdentifiers_throwsValidation() {
332+
@Test(expected = BadRequestException.class)
333+
public void test_deleteContentlets_emptyIdentifiers_throwsBadRequest() {
334334
new DeleteContentletsForm(Collections.emptyList());
335335
}
336336

337-
@Test(expected = ValidationException.class)
338-
public void test_deleteContentlets_nullIdentifiers_throwsValidation() {
337+
@Test(expected = BadRequestException.class)
338+
public void test_deleteContentlets_nullIdentifiers_throwsBadRequest() {
339339
new DeleteContentletsForm(null);
340340
}
341341

0 commit comments

Comments
 (0)