]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8916 WS api/qualityprofiles/search deprecate params lang & name
authorDaniel Schwarz <daniel.schwarz@sonarsource.com>
Thu, 9 Mar 2017 11:02:49 +0000 (12:02 +0100)
committerDaniel Schwarz <bartfastiel@users.noreply.github.com>
Thu, 9 Mar 2017 15:58:46 +0000 (16:58 +0100)
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/SearchAction.java
server/sonar-server/src/test/java/org/sonar/server/qualityprofile/ws/QProfilesWsTest.java

index 0bb90e66b69afb5a1bad181b839462975cd9cd78..58e95b38d3462e3e625754b3be3aad341c6c2aa7 100644 (file)
@@ -62,7 +62,8 @@ public class SearchAction implements QProfileWsAction {
       .setDescription(
         format("Language key. If provided, only profiles for the given language are returned. " +
           "It should not be used with '%s', '%s or '%s' at the same time.", PARAM_DEFAULTS, PARAM_PROJECT_KEY, PARAM_PROFILE_NAME))
-      .setPossibleValues(LanguageParamUtils.getLanguageKeys(languages));
+      .setPossibleValues(LanguageParamUtils.getLanguageKeys(languages))
+      .setDeprecatedSince("6.4");
 
     action.createParam(PARAM_PROJECT_KEY)
       .setDescription(format("Project or module key. If provided, '%s' and '%s' parameters should not be provided.",
@@ -79,7 +80,8 @@ public class SearchAction implements QProfileWsAction {
 
     action.createParam(PARAM_PROFILE_NAME)
       .setDescription(format("Profile name. It should be always used with the '%s' or '%s' parameter.", PARAM_PROJECT_KEY, PARAM_DEFAULTS))
-      .setExampleValue("SonarQube Way");
+      .setExampleValue("SonarQube Way")
+      .setDeprecatedSince("6.4");
   }
 
   @Override
index f9f8a2c13236c97f54f7108d4a0630da662fe0d0..5ad37717e547cb264160401f17218eaadb1add49 100644 (file)
@@ -128,6 +128,8 @@ public class QProfilesWsTest {
     assertThat(search.isPost()).isFalse();
     assertThat(search.params()).hasSize(4);
     assertThat(search.param("language").possibleValues()).containsOnly(xoo1Key, xoo2Key);
+    assertThat(search.param("language").deprecatedSince()).isEqualTo("6.4");
+    assertThat(search.param("profileName").deprecatedSince()).isEqualTo("6.4");
   }
 
   @Test