use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class SuggestionsAction method define.
@Override
public void define(WebService.NewController context) {
NewAction action = context.createAction(ACTION_SUGGESTIONS).setDescription("Internal WS for the top-right search engine").setSince("4.2").setInternal(true).setHandler(this).setResponseExample(Resources.getResource(this.getClass(), "components-example-suggestions.json"));
action.createParam(URL_PARAM_QUERY).setRequired(true).setDescription("Substring of project key (minimum 2 characters)").setExampleValue("sonar");
}
use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class SetTagsAction method define.
@Override
public void define(WebService.NewController controller) {
NewAction action = controller.createAction(ACTION_SET_TAGS).setPost(true).setSince("5.1").setDescription("Set tags on an issue. <br/>" + "Requires authentication and Browse permission on project<br/>" + "Since 6.3, the parameter 'key' has been replaced by '%s'", PARAM_ISSUE).setResponseExample(Resources.getResource(this.getClass(), "set_tags-example.json")).setHandler(this);
action.createParam(PARAM_ISSUE).setDescription("Issue key").setSince("6.3").setDeprecatedKey("key", "6.3").setExampleValue(Uuids.UUID_EXAMPLE_01).setRequired(true);
action.createParam(PARAM_TAGS).setDescription("Comma-separated list of tags. All tags are removed if parameter is empty or not set.").setExampleValue("security,cwe,misra-c");
}
use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class TagsAction method define.
@Override
public void define(WebService.NewController controller) {
NewAction action = controller.createAction("tags").setHandler(this).setSince("5.1").setDescription("List tags matching a given query").setResponseExample(Resources.getResource(getClass(), "tags-example.json"));
action.createParam(Param.TEXT_QUERY).setDescription("A pattern to match tags against").setExampleValue("misra");
action.createParam("ps").setDescription("The size of the list to return").setExampleValue("25").setDefaultValue("10");
}
use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class ChangeParentAction method define.
@Override
public void define(NewController context) {
NewAction inheritance = context.createAction("change_parent").setSince("5.2").setPost(true).setDescription("Change a quality profile's parent.").setHandler(this);
QProfileRef.defineParams(inheritance, languages);
inheritance.createParam(PARAM_PARENT_KEY).setDescription("The key of the new parent profile. If this parameter is set, parentName must not be set. " + "If both are left empty, the inheritance link with current parent profile (if any) is broken, which deactivates all rules " + "which come from the parent and are not overridden. Require Administer Quality Profiles permission.").setExampleValue("sonar-way-java-12345");
inheritance.createParam(PARAM_PARENT_NAME).setDescription("A quality profile name. If this parameter is set, profileKey must not be set and language must be set to disambiguate.").setExampleValue("Sonar way");
}
use of org.sonar.api.server.ws.WebService.NewAction in project sonarqube by SonarSource.
the class ChangelogAction method define.
@Override
public void define(NewController context) {
NewAction wsAction = context.createAction("changelog").setSince("5.2").setDescription("Get the history of changes on a quality profile: rule activation/deactivation, change in parameters/severity. " + "Events are ordered by date in descending order (most recent first).").setHandler(this).setResponseExample(getClass().getResource("example-changelog.json"));
QProfileRef.defineParams(wsAction, languages);
wsAction.addPagingParams(50, MAX_LIMIT);
wsAction.createParam(PARAM_SINCE).setDescription("Start date for the changelog.").setExampleValue("2011-04-25T01:15:42+0100");
wsAction.createParam(PARAM_TO).setDescription("End date for the changelog.").setExampleValue("2013-07-25T07:35:42+0200");
}
Aggregations