]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-13497 Improve WS documentation of /api/projects
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Thu, 13 Aug 2020 20:21:04 +0000 (15:21 -0500)
committersonartech <sonartech@sonarsource.com>
Fri, 14 Aug 2020 20:16:19 +0000 (20:16 +0000)
server/sonar-webserver-webapi/src/main/java/org/sonar/server/project/ws/DeleteAction.java
server/sonar-webserver-webapi/src/main/java/org/sonar/server/project/ws/SearchAction.java
server/sonar-webserver-webapi/src/test/java/org/sonar/server/project/ws/SearchActionTest.java

index 70c68287e2505ed5c94dbb702d651e883435ccf4..50d36ffcf27aa2e81b56f8d7b9058d2b16d4316d 100644 (file)
@@ -68,6 +68,7 @@ public class DeleteAction implements ProjectsWsAction {
     action
       .createParam(PARAM_PROJECT)
       .setDescription("Project key")
+      .setRequired(true)
       .setExampleValue(KEY_PROJECT_EXAMPLE_001);
   }
 
index 4131aae98b5277b6a0609b99eac06570771b12b0..f2eb37551b3ef3f96979b193aee9d917d6192551 100644 (file)
@@ -83,7 +83,7 @@ public class SearchAction implements ProjectsWsAction {
     WebService.NewAction action = context.createAction(ACTION_SEARCH)
       .setSince("6.3")
       .setDescription("Search for projects or views to administrate them.<br>" +
-        "Requires 'System Administrator' permission")
+        "Requires 'Administer System' permission")
       .addPagingParams(100, MAX_PAGE_SIZE)
       .setResponseExample(getClass().getResource("search-example.json"))
       .setHandler(this);
index 5c950cf6161e6f45d6f3c2338d8c67fcc0b41219..9accaa07d3e6658ba36ab08b2d6397a7bacae74e 100644 (file)
@@ -324,7 +324,7 @@ public class SearchActionTest {
     WebService.Action action = ws.getDef();
     assertThat(action.key()).isEqualTo("search");
     assertThat(action.isPost()).isFalse();
-    assertThat(action.description()).isEqualTo("Search for projects or views to administrate them.<br>Requires 'System Administrator' permission");
+    assertThat(action.description()).isEqualTo("Search for projects or views to administrate them.<br>Requires 'Administer System' permission");
     assertThat(action.isInternal()).isFalse();
     assertThat(action.since()).isEqualTo("6.3");
     assertThat(action.handler()).isEqualTo(ws.getDef().handler());