From: Teryk Bellahsene Date: Mon, 25 Sep 2017 13:46:01 +0000 (+0200) Subject: Sanitize WS api/issues/search X-Git-Tag: 6.6-RC1~240 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d04444e908b75cc9554c9480e7da813c83384964;p=sonarqube.git Sanitize WS api/issues/search --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java index de9e1ae8425..4514dda8a3a 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java @@ -231,8 +231,8 @@ public class SearchAction implements IssuesWsAction { .setDefaultValue("false"); action.createParam(PARAM_COMPONENT_KEYS) - .setDescription("To retrieve issues associated to a specific list of components sub-components (comma-separated list of component keys). " + - "A component can be a view, project, module, directory or file.") + .setDescription("Comma-separated list of component keys. Retrieve issues associated to a specific list of components (and all its descendants). " + + "A component can be a portfolio, project, module, directory or file.") .setExampleValue(KEY_PROJECT_EXAMPLE_001); action.createParam(PARAM_COMPONENTS) @@ -265,14 +265,13 @@ public class SearchAction implements IssuesWsAction { action.createParam(PARAM_PROJECT_UUIDS) .setDescription("To retrieve issues associated to a specific list of projects (comma-separated list of project IDs). " + INTERNAL_PARAMETER_DISCLAIMER + - "Views are not supported. If this parameter is set, projectKeys must not be set.") + "Portfolios are not supported. If this parameter is set, '%s' must not be set.", PARAM_PROJECTS) .setInternal(true) .setExampleValue("7d8749e8-3070-4903-9188-bdd82933bb92"); action.createParam(PARAM_MODULE_UUIDS) .setDescription("To retrieve issues associated to a specific list of modules (comma-separated list of module IDs). " + - INTERNAL_PARAMETER_DISCLAIMER + - "Views are not supported. If this parameter is set, moduleKeys must not be set.") + INTERNAL_PARAMETER_DISCLAIMER) .setInternal(true) .setExampleValue("7d8749e8-3070-4903-9188-bdd82933bb92"); diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java index 6699b0ab8b4..fcad3faf27c 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionTest.java @@ -145,6 +145,11 @@ public class SearchActionTest { assertThat(branch.isInternal()).isTrue(); assertThat(branch.isRequired()).isFalse(); assertThat(branch.since()).isEqualTo("6.6"); + + WebService.Param projectUuids = def.param("projectUuids"); + assertThat(projectUuids.description()).isEqualTo("To retrieve issues associated to a specific list of projects (comma-separated list of project IDs). " + + "This parameter is mostly used by the Issues page, please prefer usage of the componentKeys parameter. " + + "Portfolios are not supported. If this parameter is set, 'projects' must not be set."); } @Test