use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class UsersAction method define.
@Override
public void define(NewController context) {
NewAction action = context.createAction("users").setDescription("Search for users with membership information with respect to a group.<br>" + "Requires the following permission: 'Administer System'.").setHandler(this).setSince("5.2").setResponseExample(getClass().getResource("users-example.json")).addSelectionModeParam().addSearchQuery("freddy", "names", "logins").addPagingParams(25);
defineGroupWsParameters(action);
}
use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class WebServiceTest method fail_if_duplicated_action_parameters.
@Test
public void fail_if_duplicated_action_parameters() {
expectedException.expect(IllegalStateException.class);
expectedException.expectMessage("The parameter 'key' is defined multiple times in the action 'create'");
((WebService) context -> {
NewController controller = context.createController("api/rule");
NewAction action = newDefaultAction(controller, "create");
action.createParam("key");
action.createParam("key");
controller.done();
}).define(context);
}
Aggregations