.setSince("6.3")
.setDescription("Search for components")
.addPagingParams(100)
- .addSearchQuery("sona", "component names", "component keys")
.setResponseExample(getClass().getResource("search-components-example.json"))
.setHandler(this);
+
+ action.createParam(Param.TEXT_QUERY)
+ .setDescription("Limit search to: <ul>" +
+ "<li>component names that contain the supplied string</li>" +
+ "<li>component keys that are exactly the same as the supplied string</li>" +
+ "</ul>")
+ .setExampleValue("sonar");
+
action
.createParam(PARAM_ORGANIZATION)
.setDescription("Organization key")
.setInternal(true)
.setExampleValue("my-org")
.setSince("6.3");
+
action
.createParam(PARAM_LANGUAGE)
.setDescription("Language key. If provided, only components for the given language are returned.")
"Requires 'System Administrator' permission")
.setInternal(true)
.addPagingParams(100, MAX_PAGE_SIZE)
- .addSearchQuery("sona", "component names", "component keys")
.setResponseExample(getClass().getResource("search-example.json"))
.setHandler(this);
action.setChangelog(new Change("6.4", "The 'uuid' field is deprecated in the response"));
+ action.createParam(Param.TEXT_QUERY)
+ .setDescription("Limit search to: <ul>" +
+ "<li>component names that contain the supplied string</li>" +
+ "<li>component keys that are exactly the same as the supplied string</li>" +
+ "</ul>")
+ .setExampleValue("sonar");
+
action.createParam(PARAM_QUALIFIERS)
.setDescription("Comma-separated list of component qualifiers. Filter the results with the specified qualifiers")
.setPossibleValues(PROJECT, VIEW, APP)
WebService.Param qParam = action.param("q");
assertThat(qParam.isRequired()).isFalse();
- assertThat(qParam.description()).isEqualTo("Limit search to component names or component keys that contain the supplied string.");
+ assertThat(qParam.description()).isEqualTo("Limit search to: " +
+ "<ul>" +
+ "<li>component names that contain the supplied string</li>" +
+ "<li>component keys that are exactly the same as the supplied string</li>" +
+ "</ul>");
WebService.Param qualifierParam = action.param("qualifiers");
assertThat(qualifierParam.isRequired()).isFalse();