]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-18747 Remove api/qualitygates/search deprecated more response field
authorZipeng WU <zipeng.wu@sonarsource.com>
Thu, 30 Mar 2023 12:34:53 +0000 (14:34 +0200)
committersonartech <sonartech@sonarsource.com>
Thu, 30 Mar 2023 20:03:07 +0000 (20:03 +0000)
server/sonar-webserver-webapi/src/it/java/org/sonar/server/qualitygate/ws/SearchActionIT.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualitygate/ws/SearchAction.java
sonar-ws/src/main/protobuf/ws-qualitygates.proto

index ce4a12c3fdbfbd47d7b854f9357941e41b5ecd3a..5a4a329ed83e56d3a3bb1bb0c3cdef7cb3fa189e 100644 (file)
@@ -245,11 +245,11 @@ public class SearchActionIT {
       .executeProtobuf(SearchResponse.class);
 
     assertThat(response)
-      .extracting(SearchResponse::getMore,
+      .extracting(
         searchResponse -> searchResponse.getPaging().getPageIndex(),
         searchResponse -> searchResponse.getPaging().getPageSize(),
         searchResponse -> searchResponse.getPaging().getTotal())
-      .contains(true, 2, 5, 20);
+      .contains(2, 5, 20);
   }
 
   @Test
@@ -268,11 +268,11 @@ public class SearchActionIT {
       .executeProtobuf(SearchResponse.class);
 
     assertThat(response)
-      .extracting(SearchResponse::getMore,
+      .extracting(
         searchResponse -> searchResponse.getPaging().getPageIndex(),
         searchResponse -> searchResponse.getPaging().getPageSize(),
         searchResponse -> searchResponse.getPaging().getTotal())
-      .contains(false, 1, 100, 20);
+      .contains(1, 100, 20);
   }
 
   @Test
index f452f7f09e7f15ae397b17a080746ddfb05b30b2..e89d0b6c2c595d9f5ec18d326ebc31288179d080 100644 (file)
@@ -67,6 +67,7 @@ public class SearchAction implements QualityGatesWsAction {
       .setSince("4.3")
       .setResponseExample(Resources.getResource(this.getClass(), "search-example.json"))
       .setChangelog(
+        new Change("10.0", "deprecated 'more' response field has been removed"),
         new Change("10.0", "Parameter 'gateId' is removed. Use 'gateName' instead."),
         new Change("8.4", "Parameter 'gateName' added"),
         new Change("8.4", "Parameter 'gateId' is deprecated. Format changes from integer to string. Use 'gateName' instead."),
@@ -123,7 +124,7 @@ public class SearchAction implements QualityGatesWsAction {
         .andTotal(authorizedProjects.size());
       List<ProjectQgateAssociationDto> paginatedProjects = getPaginatedProjects(authorizedProjects, paging);
 
-      Qualitygates.SearchResponse.Builder createResponse = Qualitygates.SearchResponse.newBuilder().setMore(paging.hasNextPage());
+      Qualitygates.SearchResponse.Builder createResponse = Qualitygates.SearchResponse.newBuilder();
       createResponse.getPagingBuilder()
         .setPageIndex(paging.pageIndex())
         .setPageSize(paging.pageSize())
index 06dfa914fc14e7c8b2de1da6d4ad7e7d63dbe9d5..4a5ec0976962ac3997697bc3f48f94b1b96010f7 100644 (file)
@@ -136,8 +136,7 @@ message ShowWsResponse {
 
 // GET api/qualitygates/search
 message SearchResponse {
-  // Deprecated since 7.9
-  optional bool more = 1;
+  reserved 1; // drop more
   repeated Result results = 2;
   optional sonarqube.ws.commons.Paging paging = 3;