From 3f3dce6012340e75c1f0b5f948e24562d66fc5e3 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Mon, 12 Jan 2015 13:48:30 +0100 Subject: [PATCH] SONAR-3718 Add WS documentation --- .../main/java/org/sonar/server/component/ws/ProjectsWs.java | 5 +++++ .../java/org/sonar/server/component/ws/ProjectsWsTest.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/component/ws/ProjectsWs.java b/server/sonar-server/src/main/java/org/sonar/server/component/ws/ProjectsWs.java index 3f0f0831c24..b5afbcf0d98 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/component/ws/ProjectsWs.java +++ b/server/sonar-server/src/main/java/org/sonar/server/component/ws/ProjectsWs.java @@ -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); } diff --git a/server/sonar-server/src/test/java/org/sonar/server/component/ws/ProjectsWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/component/ws/ProjectsWsTest.java index 9a978d15338..563f2774996 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/component/ws/ProjectsWsTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/component/ws/ProjectsWsTest.java @@ -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 -- 2.39.5