.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).")
+ .setChangelog(
+ new org.sonar.api.server.ws.Change("9.8", "response fields 'total', 's', 'ps' have been deprecated, please use 'paging' object instead"),
+ new org.sonar.api.server.ws.Change("9.8", "The field 'paging' has been added to the response"))
.setHandler(this)
.setResponseExample(getClass().getResource("changelog-example.json"));
private static void writeResponse(JsonWriter json, int total, int page, int pageSize, List<Change> changelogs,
Map<String, UserDto> usersByUuid, Map<String, RuleDto> rulesByRuleUuids) {
json.beginObject();
- json.prop("total", total);
- json.prop(Param.PAGE, page);
- json.prop(Param.PAGE_SIZE, pageSize);
+ writePaging(json, total, page, pageSize);
+ json.name("paging").beginObject()
+ .prop("pageIndex", page)
+ .prop("pageSize", pageSize)
+ .prop("total", total)
+ .endObject();
json.name("events").beginArray();
changelogs.forEach(change -> {
JsonWriter changeWriter = json.beginObject();
json.endObject();
}
+ /**
+ * @deprecated since 9.8 - replaced by 'paging' object structure.
+ */
+ @Deprecated(since = "9.8")
+ private static void writePaging(JsonWriter json, int total, int page, int pageSize) {
+ json.prop("total", total);
+ json.prop(Param.PAGE, page);
+ json.prop(Param.PAGE_SIZE, pageSize);
+ }
+
/**
* @return non-null list of changes, by descending order of date
*/
.addPagingParams(100, MAX_PAGE_SIZE)
.setHandler(this)
.setChangelog(
+ new Change("9.8", "response fields 'total', 's', 'ps' have been deprecated, please use 'paging' object instead"),
+ new Change("9.8", "The field 'paging' has been added to the response"),
new Change("5.5", "The field 'effortToFixDescription' has been deprecated use 'gapDescription' instead"),
new Change("5.5", "The field 'debtRemFnCoeff' has been deprecated use 'remFnGapMultiplier' instead"),
new Change("5.5", "The field 'defaultDebtRemFnCoeff' has been deprecated use 'defaultRemFnGapMultiplier' instead"),
response.setTotal(searchResult.total);
response.setP(context.getPage());
response.setPs(context.getLimit());
+ response.setPaging(formatPaging(searchResult.total, context.getPage(), context.getLimit()));
+ }
+
+ private static Common.Paging.Builder formatPaging(Long total, int pageIndex, int limit) {
+ return Common.Paging.newBuilder()
+ .setPageIndex(pageIndex)
+ .setPageSize(limit)
+ .setTotal(total.intValue());
}
private void writeRules(DbSession dbSession, SearchResponse.Builder response, SearchResult result, SearchOptions context) {
.addSearchQuery("freddy", "names", "logins")
.addPagingParams(25)
.setChangelog(
+ new Change("9.8", "response fields 'total', 's', 'ps' have been deprecated, please use 'paging' object instead."),
+ new Change("9.8", "The field 'paging' has been added to the response."),
new Change("8.4", "Parameter 'id' is deprecated. Format changes from integer to string. Use 'name' instead."));
defineGroupWsParameters(action);
json.beginObject();
writeMembers(json, users);
writePaging(json, paging);
+ json.name("paging").beginObject()
+ .prop("pageIndex", page)
+ .prop("pageSize", pageSize)
+ .prop("total", total)
+ .endObject();
json.endObject();
}
}
json.endArray();
}
+ /**
+ * @deprecated since 9.8 - replaced by 'paging' object structure.
+ */
+ @Deprecated(since = "9.8")
private static void writePaging(JsonWriter json, Paging paging) {
json.prop(Param.PAGE, paging.pageIndex())
.prop(Param.PAGE_SIZE, paging.pageSize())
"custom": false
}
],
- "total": 2,
- "p": 1,
- "ps": 100
+ "paging": {
+ "pageSize": 100,
+ "total": 2,
+ "pageIndex": 1
+ }
}
{
- "total": 3,
- "ps": 10,
- "p": 1,
+ "paging": {
+ "pageSize": 10,
+ "total": 3,
+ "pageIndex": 1
+ },
"events": [
{
"date" : "2015-02-23T17:58:39+0100",
{
- "total": 4,
- "p": 1,
- "ps": 3,
+ "paging": {
+ "pageSize": 3,
+ "total": 4,
+ "pageIndex": 1
+ },
"rules": [
{
"key": "squid:S1067",
"selected": true
}
],
- "p":1,
- "ps":25,
- "total":2
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 25,
+ "total": 2
+ }
}
{
"format": "json",
- "example": "{\n \"paging\": {\n \"pageIndex\": 1,\n \"pageSize\": 100,\n \"total\": 1\n },\n \"issues\": [\n {\n \"key\": \"01fc972e-2a3c-433e-bcae-0bd7f88f5123\",\n \"component\": \"com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest\",\n \"project\": \"com.github.kevinsawicki:http-request\",\n \"rule\": \"checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck\",\n \"status\": \"RESOLVED\",\n \"resolution\": \"FALSE-POSITIVE\",\n \"severity\": \"MINOR\",\n \"message\": \"'3' is a magic number.\",\n \"line\": 530,\n \"textRange\": {\n \"startLine\": 81,\n \"endLine\": 81,\n \"startOffset\": 0,\n \"endOffset\": 134\n },\n \"author\": \"Developer 1\",\n \"debt\": \"2h1min\",\n \"creationDate\": \"2013-05-13T17:55:39+0200\",\n \"updateDate\": \"2013-05-13T17:55:39+0200\",\n \"tags\": [\"bug\"],\n \"comments\": [\n {\n \"key\": \"7d7c56f5-7b5a-41b9-87f8-36fa70caa5ba\",\n \"login\": \"john.smith\",\n \"htmlText\": \"Must be "final"!\",\n \"markdown\": \"Must be \\\"final\\\"!\",\n \"updatable\": false,\n \"createdAt\": \"2013-05-13T18:08:34+0200\"\n }\n ],\n \"attr\": {\n \"jira-issue-key\": \"SONAR-1234\"\n },\n \"transitions\": [\n \"unconfirm\",\n \"resolve\",\n \"falsepositive\"\n ],\n \"actions\": [\n \"comment\"\n ]\n }\n ],\n \"components\": [\n {\n \"key\": \"com.github.kevinsawicki:http-request:src/main/java/com/github/kevinsawicki/http/HttpRequest.java\",\n \"enabled\": true,\n \"qualifier\": \"FIL\",\n \"name\": \"HttpRequest.java\",\n \"longName\": \"src/main/java/com/github/kevinsawicki/http/HttpRequest.java\",\n \"path\": \"src/main/java/com/github/kevinsawicki/http/HttpRequest.java\"\n },\n {\n \"key\": \"com.github.kevinsawicki:http-request\",\n \"enabled\": true,\n \"qualifier\": \"TRK\",\n \"name\": \"http-request\",\n \"longName\": \"http-request\"\n }\n ],\n \"rules\": [\n {\n \"key\": \"checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck\",\n \"name\": \"Magic Number\",\n \"status\": \"READY\",\n \"lang\": \"java\",\n \"langName\": \"Java\"\n }\n ],\n \"users\": [\n {\n \"login\": \"admin\",\n \"name\": \"Administrator\",\n \"active\": true,\n \"email\": \"admin@sonarqube.org\"\n }\n ]\n\n}"
+ "example": {
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 100,
+ "total": 1
+ },
+ "issues": [
+ {
+ "key": "01fc972e-2a3c-433e-bcae-0bd7f88f5123",
+ "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
+ "project": "com.github.kevinsawicki:http-request",
+ "rule": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
+ "status": "RESOLVED",
+ "resolution": "FALSE-POSITIVE",
+ "severity": "MINOR",
+ "message": "'3' is a magic number.",
+ "line": 530,
+ "textRange": {
+ "startLine": 81,
+ "endLine": 81,
+ "startOffset": 0,
+ "endOffset": 134
+ },
+ "author": "Developer 1",
+ "debt": "2h1min",
+ "creationDate": "2013-05-13T17: 55: 39+0200",
+ "updateDate": "2013-05-13T17: 55: 39+0200",
+ "tags": [
+ "bug"
+ ],
+ "comments": [
+ {
+ "key": "7d7c56f5-7b5a-41b9-87f8-36fa70caa5ba",
+ "login": "john.smith",
+ "htmlText": "Must be "final"!",
+ "markdown": "Must be \"final\"!",
+ "updatable": false,
+ "createdAt": "2013-05-13T18: 08: 34+0200"
+ }
+ ],
+ "attr": {
+ "jira-issue-key": "SONAR-1234"
+ },
+ "transitions": [
+ "unconfirm",
+ "resolve",
+ "falsepositive"
+ ],
+ "actions": [
+ "comment"
+ ]
+ }
+ ],
+ "components": [
+ {
+ "key": "com.github.kevinsawicki:http-request:src/main/java/com/github/kevinsawicki/http/HttpRequest.java",
+ "enabled": true,
+ "qualifier": "FIL",
+ "name": "HttpRequest.java",
+ "longName": "src/main/java/com/github/kevinsawicki/http/HttpRequest.java",
+ "path": "src/main/java/com/github/kevinsawicki/http/HttpRequest.java"
+ },
+ {
+ "key": "com.github.kevinsawicki:http-request",
+ "enabled": true,
+ "qualifier": "TRK",
+ "name": "http-request",
+ "longName": "http-request"
+ }
+ ],
+ "rules": [
+ {
+ "key": "checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MagicNumberCheck",
+ "name": "Magic Number",
+ "status": "READY",
+ "lang": "java",
+ "langName": "Java"
+ }
+ ],
+ "users": [
+ {
+ "login": "admin",
+ "name": "Administrator",
+ "active": true,
+ "email": "admin@sonarqube.org"
+ }
+ ]
+ }
}
" \"total\": 1,\n" +
" \"p\": 1,\n" +
" \"ps\": 50,\n" +
+ " \"paging\": {\n" +
+ " \"pageIndex\": 1,\n" +
+ " \"pageSize\": 50,\n" +
+ " \"total\": 1\n" +
+ " }," +
" \"events\": [\n" +
" {\n" +
" \"date\": \"" + DATE + "\",\n" +
@Test
public void changelog_empty() {
QProfileDto qualityProfile = db.qualityProfiles().insert();
-
String response = ws.newRequest()
.setParam(PARAM_LANGUAGE, qualityProfile.getLanguage())
.setParam(PARAM_QUALITY_PROFILE, qualityProfile.getName())
.execute()
.getInput();
- assertJson(response).isSimilarTo("{\"total\":0,\"p\":1,\"ps\":50,\"events\":[]}");
+ assertJson(response).isSimilarTo("{\"total\":0,\"p\":1,\"ps\":50,\"paging\":{\"pageIndex\":1,\"pageSize\":50,\"total\":0},\"events\":[]}");
}
@Test
}
@Test
- public void example() {
+ public void changelog_example() {
QProfileDto profile = db.qualityProfiles().insert();
String profileUuid = profile.getRulesProfileUuid();
.setChangeType(ActiveRuleChange.Type.ACTIVATED.name())
.setData(ImmutableMap.of("severity", "MAJOR", "param_format", "^[A-Z][a-zA-Z0-9]*$", "ruleUuid", rule3.getUuid())));
- String response = ws.newRequest()
+ ws.newRequest()
.setMethod("GET")
.setParam(PARAM_LANGUAGE, profile.getLanguage())
.setParam(PARAM_QUALITY_PROFILE, profile.getName())
.setParam("ps", "10")
.execute()
- .getInput();
-
- assertJson(response).isSimilarTo(getClass().getResource("changelog-example.json"));
+ .assertJson(this.getClass(), "changelog_example.json");
}
@Test
assertThat(response.getTotal()).isZero();
assertThat(response.getP()).isOne();
+ assertThat(response.getPaging().getTotal()).isZero();
+ assertThat(response.getPaging().getPageIndex()).isOne();
+ assertThat(response.getPaging().getPageSize()).isNotZero();
assertThat(response.getRulesCount()).isZero();
}
.setParam("f", "langName")
.executeProtobuf(SearchResponse.class);
assertThat(result.getTotal()).isOne();
+ assertThat(result.getPaging().getTotal()).isOne();
+ assertThat(result.getPaging().getPageIndex()).isOne();
assertThat(result.getRulesCount()).isOne();
Rule searchedRule = result.getRules(0);
.setParam("f", "debtRemFn,debtOverloaded,defaultDebtRemFn")
.executeProtobuf(SearchResponse.class);
assertThat(result.getTotal()).isOne();
+ assertThat(result.getPaging().getTotal()).isOne();
+ assertThat(result.getPaging().getPageIndex()).isOne();
assertThat(result.getRulesCount()).isOne();
Rule searchedRule = result.getRules(0);
.setParam("f", "debtRemFn,debtOverloaded,defaultDebtRemFn")
.executeProtobuf(SearchResponse.class);
assertThat(result.getTotal()).isOne();
+ assertThat(result.getPaging().getTotal()).isOne();
+ assertThat(result.getPaging().getPageIndex()).isOne();
assertThat(result.getRulesCount()).isOne();
Rule searchedRule = result.getRules(0);
.setParam("f", "debtRemFn,debtOverloaded,defaultDebtRemFn")
.executeProtobuf(SearchResponse.class);
assertThat(result.getTotal()).isOne();
+ assertThat(result.getPaging().getTotal()).isOne();
+ assertThat(result.getPaging().getPageIndex()).isOne();
assertThat(result.getRulesCount()).isOne();
Rule searchedRule = result.getRules(0);
.setParam("is_template", "true")
.executeProtobuf(SearchResponse.class);
assertThat(result.getTotal()).isOne();
+ assertThat(result.getPaging().getTotal()).isOne();
+ assertThat(result.getPaging().getPageIndex()).isOne();
assertThat(result.getRulesCount()).isOne();
Rule searchedRule = result.getRules(0);
.setParam("template_key", templateRule.getRepositoryKey() + ":" + templateRule.getRuleKey())
.executeProtobuf(SearchResponse.class);
assertThat(result.getTotal()).isOne();
+ assertThat(result.getPaging().getTotal()).isOne();
+ assertThat(result.getPaging().getPageIndex()).isOne();
assertThat(result.getRulesCount()).isOne();
Rule searchedRule = result.getRules(0);
SearchResponse result = ws.newRequest().executeProtobuf(SearchResponse.class);
assertThat(result.getTotal()).isZero();
+ assertThat(result.getPaging().getTotal()).isZero();
+ assertThat(result.getPaging().getPageIndex()).isOne();
assertThat(result.getRulesCount()).isZero();
}
.setParam("activation", "true")
.executeProtobuf(SearchResponse.class);
assertThat(result.getTotal()).isOne();
+ assertThat(result.getPaging().getTotal()).isOne();
+ assertThat(result.getPaging().getPageIndex()).isOne();
assertThat(result.getRulesCount()).isOne();
Rule searchedRule = result.getRules(0);
.setParam("qprofile", profile.getKee())
.executeProtobuf(SearchResponse.class);
assertThat(result.getTotal()).isOne();
+ assertThat(result.getPaging().getTotal()).isOne();
+ assertThat(result.getPaging().getPageIndex()).isOne();
assertThat(result.getRulesCount()).isOne();
assertThat(result.getActives()).isNotNull();
assertThat(result.getActives().getActives().get(rule.getKey().toString())).isNotNull();
.executeProtobuf(SearchResponse.class);
assertThat(result.getTotal()).isOne();
+ assertThat(result.getPaging().getTotal()).isOne();
+ assertThat(result.getPaging().getPageIndex()).isOne();
assertThat(result.getRulesCount()).isOne();
assertThat(result.getActives()).isNotNull();
assertThat(result.getActives().getActives().get(rule.getKey().toString())).isNotNull();
tuple(rule3.getKey().toString(), rule3.getStatus().name()));
}
+ @Test
+ public void paging() {
+ for (int i = 0; i < 12; i++) {
+ db.rules().insert(r -> r.setLanguage("java"));
+ }
+ indexRules();
+
+ ws.newRequest()
+ .setParam(WebService.Param.PAGE, "2")
+ .setParam(WebService.Param.PAGE_SIZE, "9")
+ .execute()
+ .assertJson(this.getClass(), "paging.json");
+ }
+
@Test
public void compare_to_another_profile() {
QProfileDto profile = db.qualityProfiles().insert(p -> p.setLanguage(JAVA));
Rules.SearchResponse response = request.executeProtobuf(Rules.SearchResponse.class);
assertThat(response.getP()).isOne();
+ assertThat(response.getPaging().getPageIndex()).isOne();
+ assertThat(response.getPaging().getPageSize()).isNotZero();
RuleKey[] expectedRuleKeys = stream(expectedRules).map(RuleDto::getKey).collect(MoreCollectors.toList()).toArray(new RuleKey[0]);
assertThat(response.getRulesList())
.extracting(r -> RuleKey.parse(r.getKey()))
.containsExactlyInAnyOrder(expectedRuleKeys);
assertThat(response.getTotal()).isEqualTo(expectedRules.length);
+ assertThat(response.getPaging().getTotal()).isEqualTo(expectedRules.length);
assertThat(response.getRulesCount()).isEqualTo(expectedRules.length);
}
assertThat(wsDef.since()).isEqualTo("5.2");
assertThat(wsDef.isPost()).isFalse();
assertThat(wsDef.changelog()).extracting(Change::getVersion, Change::getDescription).containsOnly(
+ tuple("9.8", "response fields 'total', 's', 'ps' have been deprecated, please use 'paging' object instead."),
+ tuple("9.8", "The field 'paging' has been added to the response."),
tuple("8.4", "Parameter 'id' is deprecated. Format changes from integer to string. Use 'name' instead."));
}
assertJson(result).isSimilarTo("{\n" +
" \"p\": 1,\n" +
" \"total\": 0,\n" +
+ " \"paging\": {\n" +
+ " \"pageIndex\": 1,\n" +
+ " \"pageSize\": 25,\n" +
+ " \"total\": 0\n" +
+ " }," +
" \"users\": []\n" +
"}");
}
" \"p\": 1,\n" +
" \"ps\": 1,\n" +
" \"total\": 2,\n" +
+ " \"paging\": {\n" +
+ " \"pageIndex\": 1,\n" +
+ " \"pageSize\": 1,\n" +
+ " \"total\": 2\n" +
+ " }," +
" \"users\": [\n" +
" {\"login\": \"ada\", \"name\": \"Ada Lovelace\", \"selected\": true}\n" +
" ]\n" +
" \"p\": 2,\n" +
" \"ps\": 1,\n" +
" \"total\": 2,\n" +
+ " \"paging\": {\n" +
+ " \"pageIndex\": 2,\n" +
+ " \"pageSize\": 1,\n" +
+ " \"total\": 2\n" +
+ " }," +
" \"users\": [\n" +
" {\"login\": \"grace\", \"name\": \"Grace Hopper\", \"selected\": false}\n" +
" ]\n" +
{
"total": 501,
"p": 1,
- "ps": 100
+ "ps": 100,
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 100,
+ "total": 501
+ }
}
{
"total": 501,
"p": 1,
- "ps": 100
+ "ps": 100,
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 100,
+ "total": 501
+ }
}
{
"total": 501,
"p": 1,
- "ps": 999999
+ "ps": 999999,
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 999999,
+ "total": 501
+ }
}
{
"total": 0,
- "issues": []
+ "issues": [],
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 100,
+ "total": 0
+ }
}
{
"total": 12,
"p": 2,
- "ps": 9
+ "ps": 9,
+ "paging": {
+ "pageIndex": 2,
+ "pageSize": 9,
+ "total": 12
+ }
}
--- /dev/null
+{
+ "total": 3,
+ "ps": 10,
+ "p": 1,
+ "paging": {
+ "pageSize": 10,
+ "total": 3,
+ "pageIndex": 1
+ },
+ "events": [
+ {
+ "date" : "2015-02-23T17:58:39+0100",
+ "action" : "ACTIVATED",
+ "authorLogin" : "anakin.skywalker",
+ "authorName" : "Anakin Skywalker",
+ "ruleKey" : "java:S2438",
+ "ruleName" : "\"Threads\" should not be used where \"Runnables\" are expected",
+ "params" : {
+ "severity" : "CRITICAL"
+ }
+ },
+ {
+ "date" : "2015-02-23T17:58:18+0100",
+ "action" : "DEACTIVATED",
+ "authorLogin" : "padme.amidala",
+ "authorName" : "Padme Amidala",
+ "ruleKey" : "java:S2162",
+ "ruleName" : "\"equals\" methods should be symmetric and work for subclasses"
+ },
+ {
+ "action" : "ACTIVATED",
+ "authorLogin" : "obiwan.kenobi",
+ "authorName" : "Obiwan Kenobi",
+ "ruleKey" : "java:S00101",
+ "ruleName" : "Class names should comply with a naming convention",
+ "date" : "2014-09-12T15:20:46+0200",
+ "params" : {
+ "severity" : "MAJOR",
+ "format" : "^[A-Z][a-zA-Z0-9]*$"
+ }
+ }
+ ]
+}
-{"total": 1, "p": 1, "ps": 100, "rules": [
- {
- "key": "xoo:x1",
- "sysTags": ["tag1"],
- "tags": []
- }
-],
-"facets": [
+{
+ "total": 1,
+ "p": 1,
+ "ps": 100,
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 100,
+ "total": 1
+ },
+ "rules": [
+ {
+ "key": "xoo:x1",
+ "sysTags": ["tag1"],
+ "tags": []
+ }
+ ],
+ "facets": [
{
"property": "tags",
"values": [
{
- "total": 1, "p": 1, "ps": 100,
+ "total": 1,
+ "p": 1,
+ "ps": 100,
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 100,
+ "total": 1
+ },
"rules": [
{
"key": "xoo:x1",
"total": 2,
"p": 1,
"ps": 100,
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 100,
+ "total": 2
+ },
"rules": [
{
"key": "xoo:x2",
"total": 2,
"p": 1,
"ps": 100,
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 100,
+ "total": 2
+ },
"rules": [
{
"key": "xoo:x2",
{
- "total": 1, "p": 1, "ps": 100,
+ "total": 1,
+ "p": 1,
+ "ps": 100,
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 100,
+ "total": 2
+ },
"rules": [
{
"key": "xoo:x1"
-{"total": 1, "p": 1, "ps": 100, "rules": [
+{
+ "total": 1,
+ "p": 1,
+ "ps": 100,
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 100,
+ "total": 1
+ },
+ "rules": [
{
"key": "xoo:x1",
"remFnType": "LINEAR_OFFSET",
-{"total": 1, "p": 1, "ps": 100, "rules": [
- {
- "key": "xoo:x1",
- "remFnType": "CONSTANT_ISSUE",
- "remFnBaseEffort": "5min",
- "debtOverloaded": true,
- "defaultRemFnType": "LINEAR_OFFSET",
- "defaultRemFnGapMultiplier": "1h",
- "defaultRemFnBaseEffort": "15min"
- }
-]}
+{
+ "total": 1,
+ "p": 1,
+ "ps": 100,
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 100,
+ "total": 1
+ },
+ "rules": [
+ {
+ "key": "xoo:x1",
+ "remFnType": "CONSTANT_ISSUE",
+ "remFnBaseEffort": "5min",
+ "debtOverloaded": true,
+ "defaultRemFnType": "LINEAR_OFFSET",
+ "defaultRemFnGapMultiplier": "1h",
+ "defaultRemFnBaseEffort": "15min"
+ }
+ ]
+}
-{"total": 1, "p": 1, "ps": 100, "rules": [
+{
+ "total": 1,
+ "p": 1,
+ "ps": 100,
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 100,
+ "total": 1
+ },
+ "rules": [
{
"key": "xoo:x1",
"remFnType": "LINEAR",
"total": 0,
"p": 1,
"ps": 100,
+ "paging": {
+ "pageIndex": 1,
+ "pageSize": 100,
+ "total": 99999
+ },
"rules": [],
"actives": {},
"qProfiles": {}
--- /dev/null
+{
+ "total": 12,
+ "p": 2,
+ "ps": 9,
+ "paging": {
+ "pageIndex": 2,
+ "pageSize": 9,
+ "total": 12
+ }
+}
// WS api/rules/search
message SearchResponse {
- optional int64 total = 1;
- optional int32 p = 2;
- optional int64 ps = 3;
+ optional int64 total = 1 [deprecated=true];
+ optional int32 p = 2 [deprecated=true];
+ optional int64 ps = 3 [deprecated=true];
+
repeated Rule rules = 4;
optional Actives actives = 5;
optional QProfiles qProfiles = 6;
optional sonarqube.ws.commons.Facets facets = 7;
+ optional sonarqube.ws.commons.Paging paging = 8;
}
//WS api/rules/show