]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3718 Add WS documentation
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Mon, 12 Jan 2015 12:48:30 +0000 (13:48 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Mon, 12 Jan 2015 12:48:38 +0000 (13:48 +0100)
server/sonar-server/src/main/java/org/sonar/server/component/ws/ProjectsWs.java
server/sonar-server/src/test/java/org/sonar/server/component/ws/ProjectsWsTest.java

index 3f0f0831c24e923a330180fe4c491f146d83e5e0..b5afbcf0d982993778631ebb57026dda1ef0963e 100644 (file)
@@ -100,6 +100,11 @@ public class ProjectsWs implements WebService {
       .setRequired(true)
       .setExampleValue("SonarQube");
 
+    action.createParam("branch")
+      .setDescription("SCM Branch")
+      .setRequired(false)
+      .setExampleValue("branch-5.0");
+
     RailsHandler.addFormatParam(action);
   }
 
index 9a978d15338da716c3bb2356927e3789f18dd014..563f27749967883e397d4a1537d0b7c9c18b5e02 100644 (file)
@@ -61,7 +61,7 @@ public class ProjectsWsTest {
     assertThat(action).isNotNull();
     assertThat(action.handler()).isInstanceOf(RailsHandler.class);
     assertThat(action.responseExampleAsString()).isNotEmpty();
-    assertThat(action.params()).hasSize(3);
+    assertThat(action.params()).hasSize(4);
   }
 
   @Test