Procházet zdrojové kódy

SONAR-7297 Add response samples in all issues WS

tags/6.3-RC1
Julien Lancelot před 7 roky
rodič
revize
85ef668a1c
24 změnil soubory, kde provedl 834 přidání a 11 odebrání
  1. 2
    0
      server/sonar-server/src/main/java/org/sonar/server/issue/ws/AddCommentAction.java
  2. 2
    1
      server/sonar-server/src/main/java/org/sonar/server/issue/ws/AssignAction.java
  3. 2
    0
      server/sonar-server/src/main/java/org/sonar/server/issue/ws/BulkChangeAction.java
  4. 2
    2
      server/sonar-server/src/main/java/org/sonar/server/issue/ws/ChangelogAction.java
  5. 2
    0
      server/sonar-server/src/main/java/org/sonar/server/issue/ws/DeleteCommentAction.java
  6. 2
    0
      server/sonar-server/src/main/java/org/sonar/server/issue/ws/DoTransitionAction.java
  7. 2
    0
      server/sonar-server/src/main/java/org/sonar/server/issue/ws/EditCommentAction.java
  8. 2
    0
      server/sonar-server/src/main/java/org/sonar/server/issue/ws/SetSeverityAction.java
  9. 5
    3
      server/sonar-server/src/main/java/org/sonar/server/issue/ws/SetTagsAction.java
  10. 2
    0
      server/sonar-server/src/main/java/org/sonar/server/issue/ws/SetTypeAction.java
  11. 100
    0
      server/sonar-server/src/main/resources/org/sonar/server/issue/ws/add_comment-example.json
  12. 100
    0
      server/sonar-server/src/main/resources/org/sonar/server/issue/ws/assign-example.json
  13. 6
    0
      server/sonar-server/src/main/resources/org/sonar/server/issue/ws/bulk_change-example.json
  14. 100
    0
      server/sonar-server/src/main/resources/org/sonar/server/issue/ws/delete_comment-example.json
  15. 100
    0
      server/sonar-server/src/main/resources/org/sonar/server/issue/ws/do_transition-example.json
  16. 100
    0
      server/sonar-server/src/main/resources/org/sonar/server/issue/ws/edit_comment-example.json
  17. 100
    0
      server/sonar-server/src/main/resources/org/sonar/server/issue/ws/set_severity-example.json
  18. 100
    0
      server/sonar-server/src/main/resources/org/sonar/server/issue/ws/set_tags-example.json
  19. 100
    0
      server/sonar-server/src/main/resources/org/sonar/server/issue/ws/set_type-example.json
  20. 1
    1
      server/sonar-server/src/test/java/org/sonar/server/issue/ws/AddCommentActionTest.java
  21. 1
    1
      server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java
  22. 1
    1
      server/sonar-server/src/test/java/org/sonar/server/issue/ws/DeleteCommentActionTest.java
  23. 1
    1
      server/sonar-server/src/test/java/org/sonar/server/issue/ws/EditCommentActionTest.java
  24. 1
    1
      server/sonar-server/src/test/java/org/sonar/server/issue/ws/SetTagsActionTest.java

+ 2
- 0
server/sonar-server/src/main/java/org/sonar/server/issue/ws/AddCommentAction.java Zobrazit soubor

@@ -20,6 +20,7 @@

package org.sonar.server.issue.ws;

import com.google.common.io.Resources;
import java.util.Date;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
@@ -72,6 +73,7 @@ public class AddCommentAction implements IssuesWsAction {
"Since 6.3, the response contains the issue with all details, not only the added comment")
.setSince("3.6")
.setHandler(this)
.setResponseExample(Resources.getResource(this.getClass(), "add_comment-example.json"))
.setPost(true);

action.createParam(PARAM_ISSUE)

+ 2
- 1
server/sonar-server/src/main/java/org/sonar/server/issue/ws/AssignAction.java Zobrazit soubor

@@ -19,6 +19,7 @@
*/
package org.sonar.server.issue.ws;

import com.google.common.io.Resources;
import org.apache.commons.lang.BooleanUtils;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
@@ -52,8 +53,8 @@ public class AssignAction implements IssuesWsAction {
.setDescription("Assign/Unassign an issue. Requires authentication and Browse permission on project")
.setSince("3.6")
.setHandler(this)
.setResponseExample(Resources.getResource(this.getClass(), "assign-example.json"))
.setPost(true);
// TODO add example of response

action.createParam(PARAM_ISSUE)
.setDescription("Issue key")

+ 2
- 0
server/sonar-server/src/main/java/org/sonar/server/issue/ws/BulkChangeAction.java Zobrazit soubor

@@ -20,6 +20,7 @@

package org.sonar.server.issue.ws;

import com.google.common.io.Resources;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
@@ -123,6 +124,7 @@ public class BulkChangeAction implements IssuesWsAction {
.setDescription("Bulk change on issues. Requires authentication and User role on project(s)")
.setSince("3.7")
.setHandler(this)
.setResponseExample(Resources.getResource(this.getClass(), "bulk_change-example.json"))
.setPost(true);

action.createParam(PARAM_ISSUES)

+ 2
- 2
server/sonar-server/src/main/java/org/sonar/server/issue/ws/ChangelogAction.java Zobrazit soubor

@@ -68,8 +68,8 @@ public class ChangelogAction implements IssuesWsAction {
@Override
public void define(WebService.NewController context) {
WebService.NewAction action = context.createAction(ACTION_CHANGELOG)
.setDescription("Display changelog of an issue<br/>." +
"Require the 'Browse' permission on the project of the specified issue<br/>." +
.setDescription("Display changelog of an issue.<br/>" +
"Require the 'Browse' permission on the project of the specified issue.<br/>" +
"Since 6.3, changes on effort are returning raw value in minutes, it doesn't return anymore the duration.")
.setSince("4.1")
.setHandler(this)

+ 2
- 0
server/sonar-server/src/main/java/org/sonar/server/issue/ws/DeleteCommentAction.java Zobrazit soubor

@@ -20,6 +20,7 @@

package org.sonar.server.issue.ws;

import com.google.common.io.Resources;
import java.util.Objects;
import java.util.function.Consumer;
import java.util.function.Function;
@@ -65,6 +66,7 @@ public class DeleteCommentAction implements IssuesWsAction {
"Since 6.3, 'key' parameter has been renamed to %s", PARAM_COMMENT)
.setSince("3.6")
.setHandler(this)
.setResponseExample(Resources.getResource(this.getClass(), "delete_comment-example.json"))
.setPost(true);

action.createParam(PARAM_COMMENT)

+ 2
- 0
server/sonar-server/src/main/java/org/sonar/server/issue/ws/DoTransitionAction.java Zobrazit soubor

@@ -19,6 +19,7 @@
*/
package org.sonar.server.issue.ws;

import com.google.common.io.Resources;
import java.util.Date;
import org.sonar.api.issue.DefaultTransitions;
import org.sonar.api.server.ws.Request;
@@ -65,6 +66,7 @@ public class DoTransitionAction implements IssuesWsAction {
"The transitions '" + DefaultTransitions.WONT_FIX + "' and '" + DefaultTransitions.FALSE_POSITIVE + "' require the permission 'Administer Issues'.")
.setSince("3.6")
.setHandler(this)
.setResponseExample(Resources.getResource(this.getClass(), "do_transition-example.json"))
.setPost(true);

action.createParam(PARAM_ISSUE)

+ 2
- 0
server/sonar-server/src/main/java/org/sonar/server/issue/ws/EditCommentAction.java Zobrazit soubor

@@ -20,6 +20,7 @@

package org.sonar.server.issue.ws;

import com.google.common.io.Resources;
import java.util.Objects;
import java.util.function.Consumer;
import java.util.function.Function;
@@ -71,6 +72,7 @@ public class EditCommentAction implements IssuesWsAction {
"Since 6.3, 'key' parameter has been renamed %s", PARAM_COMMENT)
.setSince("3.6")
.setHandler(this)
.setResponseExample(Resources.getResource(this.getClass(), "edit_comment-example.json"))
.setPost(true);

action.createParam(PARAM_COMMENT)

+ 2
- 0
server/sonar-server/src/main/java/org/sonar/server/issue/ws/SetSeverityAction.java Zobrazit soubor

@@ -19,6 +19,7 @@
*/
package org.sonar.server.issue.ws;

import com.google.common.io.Resources;
import org.sonar.api.rule.Severity;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
@@ -46,6 +47,7 @@ public class SetSeverityAction implements IssuesWsAction {
.setDescription("Change severity. Requires authentication and Browse permission on project")
.setSince("3.6")
.setHandler(this)
.setResponseExample(Resources.getResource(this.getClass(), "set_severity-example.json"))
.setPost(true);

action.createParam(PARAM_ISSUE)

+ 5
- 3
server/sonar-server/src/main/java/org/sonar/server/issue/ws/SetTagsAction.java Zobrazit soubor

@@ -20,6 +20,7 @@
package org.sonar.server.issue.ws;

import com.google.common.base.MoreObjects;
import com.google.common.io.Resources;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@@ -49,12 +50,13 @@ public class SetTagsAction implements IssuesWsAction {
@Override
public void define(WebService.NewController controller) {
NewAction action = controller.createAction(ACTION_SET_TAGS)
.setHandler(this)
.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);
"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")

+ 2
- 0
server/sonar-server/src/main/java/org/sonar/server/issue/ws/SetTypeAction.java Zobrazit soubor

@@ -19,6 +19,7 @@
*/
package org.sonar.server.issue.ws;

import com.google.common.io.Resources;
import org.sonar.api.rules.RuleType;
import org.sonar.api.server.ws.Request;
import org.sonar.api.server.ws.Response;
@@ -46,6 +47,7 @@ public class SetTypeAction implements IssuesWsAction {
.setDescription("Change type of issue, for instance from 'code smell' to 'bug'. Requires authentication and Browse permission on project.")
.setSince("5.5")
.setHandler(this)
.setResponseExample(Resources.getResource(this.getClass(), "set_type-example.json"))
.setPost(true);

action.createParam(PARAM_ISSUE)

+ 100
- 0
server/sonar-server/src/main/resources/org/sonar/server/issue/ws/add_comment-example.json Zobrazit soubor

@@ -0,0 +1,100 @@
{
"issue": {
"key": "AVibidgv1LF0E-ru2DVv",
"rule": "squid:S2301",
"severity": "MAJOR",
"component": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"componentId": 87163,
"project": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"line": 78,
"textRange": {
"startLine": 78,
"endLine": 78,
"startOffset": 14,
"endOffset": 39
},
"flows": [],
"status": "CONFIRMED",
"message": "Provide multiple methods instead of using \"modal\" to determine which action to take.",
"effort": "15min",
"debt": "15min",
"assignee": "john.smith",
"author": "john.smith@email.com",
"tags": [
"design"
],
"transitions": [
"unconfirm",
"resolve",
"falsepositive",
"wontfix"
],
"actions": [
"comment",
"assign",
"set_tags",
"set_type",
"assign_to_me",
"set_severity"
],
"comments": [
{
"key": "AVmDRx8Zm-z8OYZYRSxo",
"login": "jane.doo",
"htmlText": "Please fix this",
"markdown": "Please fix this",
"updatable": true,
"createdAt": "2017-01-09T13:49:53+0100"
}
],
"creationDate": "2016-11-25T13:50:24+0100",
"updateDate": "2017-01-09T13:51:12+0100",
"type": "CODE_SMELL"
},
"components": [
{
"id": 87163,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"uuid": "AVfTIlxMwczdZ2UaLhnt",
"enabled": true,
"qualifier": "FIL",
"name": "ServerIssueUpdater.java",
"longName": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"path": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"projectId": 23498,
"subProjectId": 23498
},
{
"id": 23498,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"uuid": "8b745480-b598-4e34-af4a-cb2de1808e50",
"enabled": true,
"qualifier": "TRK",
"name": "SonarLint for IntelliJ IDEA",
"longName": "SonarLint for IntelliJ IDEA"
}
],
"rules": [
{
"key": "squid:S2301",
"name": "Public methods should not contain selector arguments",
"lang": "java",
"status": "READY",
"langName": "Java"
}
],
"users": [
{
"login": "john.smith",
"name": "John Smith",
"email": "john.smith@email.com",
"active": true
},
{
"login": "jane.doo",
"name": "Jane Doo",
"email": "jane.doo@mail.net",
"active": true
}
]
}

+ 100
- 0
server/sonar-server/src/main/resources/org/sonar/server/issue/ws/assign-example.json Zobrazit soubor

@@ -0,0 +1,100 @@
{
"issue": {
"key": "AVibidgv1LF0E-ru2DVv",
"rule": "squid:S2301",
"severity": "MAJOR",
"component": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"componentId": 87163,
"project": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"line": 78,
"textRange": {
"startLine": 78,
"endLine": 78,
"startOffset": 14,
"endOffset": 39
},
"flows": [],
"status": "CONFIRMED",
"message": "Provide multiple methods instead of using \"modal\" to determine which action to take.",
"effort": "15min",
"debt": "15min",
"assignee": "john.smith",
"author": "john.smith@email.com",
"tags": [
"design"
],
"transitions": [
"unconfirm",
"resolve",
"falsepositive",
"wontfix"
],
"actions": [
"comment",
"assign",
"set_tags",
"set_type",
"assign_to_me",
"set_severity"
],
"comments": [
{
"key": "AVmDRx8Zm-z8OYZYRSxo",
"login": "jane.doo",
"htmlText": "Please fix this",
"markdown": "Please fix this",
"updatable": true,
"createdAt": "2017-01-09T13:49:53+0100"
}
],
"creationDate": "2016-11-25T13:50:24+0100",
"updateDate": "2017-01-09T13:51:12+0100",
"type": "CODE_SMELL"
},
"components": [
{
"id": 87163,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"uuid": "AVfTIlxMwczdZ2UaLhnt",
"enabled": true,
"qualifier": "FIL",
"name": "ServerIssueUpdater.java",
"longName": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"path": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"projectId": 23498,
"subProjectId": 23498
},
{
"id": 23498,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"uuid": "8b745480-b598-4e34-af4a-cb2de1808e50",
"enabled": true,
"qualifier": "TRK",
"name": "SonarLint for IntelliJ IDEA",
"longName": "SonarLint for IntelliJ IDEA"
}
],
"rules": [
{
"key": "squid:S2301",
"name": "Public methods should not contain selector arguments",
"lang": "java",
"status": "READY",
"langName": "Java"
}
],
"users": [
{
"login": "john.smith",
"name": "John Smith",
"email": "john.smith@email.com",
"active": true
},
{
"login": "jane.doo",
"name": "Jane Doo",
"email": "jane.doo@mail.net",
"active": true
}
]
}

+ 6
- 0
server/sonar-server/src/main/resources/org/sonar/server/issue/ws/bulk_change-example.json Zobrazit soubor

@@ -0,0 +1,6 @@
{
"total": 2,
"success": 1,
"ignored": 1,
"failures": 0
}

+ 100
- 0
server/sonar-server/src/main/resources/org/sonar/server/issue/ws/delete_comment-example.json Zobrazit soubor

@@ -0,0 +1,100 @@
{
"issue": {
"key": "AVibidgv1LF0E-ru2DVv",
"rule": "squid:S2301",
"severity": "MAJOR",
"component": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"componentId": 87163,
"project": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"line": 78,
"textRange": {
"startLine": 78,
"endLine": 78,
"startOffset": 14,
"endOffset": 39
},
"flows": [],
"status": "CONFIRMED",
"message": "Provide multiple methods instead of using \"modal\" to determine which action to take.",
"effort": "15min",
"debt": "15min",
"assignee": "john.smith",
"author": "john.smith@email.com",
"tags": [
"design"
],
"transitions": [
"unconfirm",
"resolve",
"falsepositive",
"wontfix"
],
"actions": [
"comment",
"assign",
"set_tags",
"set_type",
"assign_to_me",
"set_severity"
],
"comments": [
{
"key": "AVmDRx8Zm-z8OYZYRSxo",
"login": "jane.doo",
"htmlText": "Please fix this",
"markdown": "Please fix this",
"updatable": true,
"createdAt": "2017-01-09T13:49:53+0100"
}
],
"creationDate": "2016-11-25T13:50:24+0100",
"updateDate": "2017-01-09T13:51:12+0100",
"type": "CODE_SMELL"
},
"components": [
{
"id": 87163,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"uuid": "AVfTIlxMwczdZ2UaLhnt",
"enabled": true,
"qualifier": "FIL",
"name": "ServerIssueUpdater.java",
"longName": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"path": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"projectId": 23498,
"subProjectId": 23498
},
{
"id": 23498,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"uuid": "8b745480-b598-4e34-af4a-cb2de1808e50",
"enabled": true,
"qualifier": "TRK",
"name": "SonarLint for IntelliJ IDEA",
"longName": "SonarLint for IntelliJ IDEA"
}
],
"rules": [
{
"key": "squid:S2301",
"name": "Public methods should not contain selector arguments",
"lang": "java",
"status": "READY",
"langName": "Java"
}
],
"users": [
{
"login": "john.smith",
"name": "John Smith",
"email": "john.smith@email.com",
"active": true
},
{
"login": "jane.doo",
"name": "Jane Doo",
"email": "jane.doo@mail.net",
"active": true
}
]
}

+ 100
- 0
server/sonar-server/src/main/resources/org/sonar/server/issue/ws/do_transition-example.json Zobrazit soubor

@@ -0,0 +1,100 @@
{
"issue": {
"key": "AVibidgv1LF0E-ru2DVv",
"rule": "squid:S2301",
"severity": "MAJOR",
"component": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"componentId": 87163,
"project": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"line": 78,
"textRange": {
"startLine": 78,
"endLine": 78,
"startOffset": 14,
"endOffset": 39
},
"flows": [],
"status": "CONFIRMED",
"message": "Provide multiple methods instead of using \"modal\" to determine which action to take.",
"effort": "15min",
"debt": "15min",
"assignee": "john.smith",
"author": "john.smith@email.com",
"tags": [
"design"
],
"transitions": [
"unconfirm",
"resolve",
"falsepositive",
"wontfix"
],
"actions": [
"comment",
"assign",
"set_tags",
"set_type",
"assign_to_me",
"set_severity"
],
"comments": [
{
"key": "AVmDRx8Zm-z8OYZYRSxo",
"login": "jane.doo",
"htmlText": "Please fix this",
"markdown": "Please fix this",
"updatable": true,
"createdAt": "2017-01-09T13:49:53+0100"
}
],
"creationDate": "2016-11-25T13:50:24+0100",
"updateDate": "2017-01-09T13:51:12+0100",
"type": "CODE_SMELL"
},
"components": [
{
"id": 87163,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"uuid": "AVfTIlxMwczdZ2UaLhnt",
"enabled": true,
"qualifier": "FIL",
"name": "ServerIssueUpdater.java",
"longName": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"path": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"projectId": 23498,
"subProjectId": 23498
},
{
"id": 23498,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"uuid": "8b745480-b598-4e34-af4a-cb2de1808e50",
"enabled": true,
"qualifier": "TRK",
"name": "SonarLint for IntelliJ IDEA",
"longName": "SonarLint for IntelliJ IDEA"
}
],
"rules": [
{
"key": "squid:S2301",
"name": "Public methods should not contain selector arguments",
"lang": "java",
"status": "READY",
"langName": "Java"
}
],
"users": [
{
"login": "john.smith",
"name": "John Smith",
"email": "john.smith@email.com",
"active": true
},
{
"login": "jane.doo",
"name": "Jane Doo",
"email": "jane.doo@mail.net",
"active": true
}
]
}

+ 100
- 0
server/sonar-server/src/main/resources/org/sonar/server/issue/ws/edit_comment-example.json Zobrazit soubor

@@ -0,0 +1,100 @@
{
"issue": {
"key": "AVibidgv1LF0E-ru2DVv",
"rule": "squid:S2301",
"severity": "MAJOR",
"component": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"componentId": 87163,
"project": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"line": 78,
"textRange": {
"startLine": 78,
"endLine": 78,
"startOffset": 14,
"endOffset": 39
},
"flows": [],
"status": "CONFIRMED",
"message": "Provide multiple methods instead of using \"modal\" to determine which action to take.",
"effort": "15min",
"debt": "15min",
"assignee": "john.smith",
"author": "john.smith@email.com",
"tags": [
"design"
],
"transitions": [
"unconfirm",
"resolve",
"falsepositive",
"wontfix"
],
"actions": [
"comment",
"assign",
"set_tags",
"set_type",
"assign_to_me",
"set_severity"
],
"comments": [
{
"key": "AVmDRx8Zm-z8OYZYRSxo",
"login": "jane.doo",
"htmlText": "Please fix this",
"markdown": "Please fix this",
"updatable": true,
"createdAt": "2017-01-09T13:49:53+0100"
}
],
"creationDate": "2016-11-25T13:50:24+0100",
"updateDate": "2017-01-09T13:51:12+0100",
"type": "CODE_SMELL"
},
"components": [
{
"id": 87163,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"uuid": "AVfTIlxMwczdZ2UaLhnt",
"enabled": true,
"qualifier": "FIL",
"name": "ServerIssueUpdater.java",
"longName": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"path": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"projectId": 23498,
"subProjectId": 23498
},
{
"id": 23498,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"uuid": "8b745480-b598-4e34-af4a-cb2de1808e50",
"enabled": true,
"qualifier": "TRK",
"name": "SonarLint for IntelliJ IDEA",
"longName": "SonarLint for IntelliJ IDEA"
}
],
"rules": [
{
"key": "squid:S2301",
"name": "Public methods should not contain selector arguments",
"lang": "java",
"status": "READY",
"langName": "Java"
}
],
"users": [
{
"login": "john.smith",
"name": "John Smith",
"email": "john.smith@email.com",
"active": true
},
{
"login": "jane.doo",
"name": "Jane Doo",
"email": "jane.doo@mail.net",
"active": true
}
]
}

+ 100
- 0
server/sonar-server/src/main/resources/org/sonar/server/issue/ws/set_severity-example.json Zobrazit soubor

@@ -0,0 +1,100 @@
{
"issue": {
"key": "AVibidgv1LF0E-ru2DVv",
"rule": "squid:S2301",
"severity": "MAJOR",
"component": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"componentId": 87163,
"project": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"line": 78,
"textRange": {
"startLine": 78,
"endLine": 78,
"startOffset": 14,
"endOffset": 39
},
"flows": [],
"status": "CONFIRMED",
"message": "Provide multiple methods instead of using \"modal\" to determine which action to take.",
"effort": "15min",
"debt": "15min",
"assignee": "john.smith",
"author": "john.smith@email.com",
"tags": [
"design"
],
"transitions": [
"unconfirm",
"resolve",
"falsepositive",
"wontfix"
],
"actions": [
"comment",
"assign",
"set_tags",
"set_type",
"assign_to_me",
"set_severity"
],
"comments": [
{
"key": "AVmDRx8Zm-z8OYZYRSxo",
"login": "jane.doo",
"htmlText": "Please fix this",
"markdown": "Please fix this",
"updatable": true,
"createdAt": "2017-01-09T13:49:53+0100"
}
],
"creationDate": "2016-11-25T13:50:24+0100",
"updateDate": "2017-01-09T13:51:12+0100",
"type": "CODE_SMELL"
},
"components": [
{
"id": 87163,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"uuid": "AVfTIlxMwczdZ2UaLhnt",
"enabled": true,
"qualifier": "FIL",
"name": "ServerIssueUpdater.java",
"longName": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"path": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"projectId": 23498,
"subProjectId": 23498
},
{
"id": 23498,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"uuid": "8b745480-b598-4e34-af4a-cb2de1808e50",
"enabled": true,
"qualifier": "TRK",
"name": "SonarLint for IntelliJ IDEA",
"longName": "SonarLint for IntelliJ IDEA"
}
],
"rules": [
{
"key": "squid:S2301",
"name": "Public methods should not contain selector arguments",
"lang": "java",
"status": "READY",
"langName": "Java"
}
],
"users": [
{
"login": "john.smith",
"name": "John Smith",
"email": "john.smith@email.com",
"active": true
},
{
"login": "jane.doo",
"name": "Jane Doo",
"email": "jane.doo@mail.net",
"active": true
}
]
}

+ 100
- 0
server/sonar-server/src/main/resources/org/sonar/server/issue/ws/set_tags-example.json Zobrazit soubor

@@ -0,0 +1,100 @@
{
"issue": {
"key": "AVibidgv1LF0E-ru2DVv",
"rule": "squid:S2301",
"severity": "MAJOR",
"component": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"componentId": 87163,
"project": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"line": 78,
"textRange": {
"startLine": 78,
"endLine": 78,
"startOffset": 14,
"endOffset": 39
},
"flows": [],
"status": "CONFIRMED",
"message": "Provide multiple methods instead of using \"modal\" to determine which action to take.",
"effort": "15min",
"debt": "15min",
"assignee": "john.smith",
"author": "john.smith@email.com",
"tags": [
"design"
],
"transitions": [
"unconfirm",
"resolve",
"falsepositive",
"wontfix"
],
"actions": [
"comment",
"assign",
"set_tags",
"set_type",
"assign_to_me",
"set_severity"
],
"comments": [
{
"key": "AVmDRx8Zm-z8OYZYRSxo",
"login": "jane.doo",
"htmlText": "Please fix this",
"markdown": "Please fix this",
"updatable": true,
"createdAt": "2017-01-09T13:49:53+0100"
}
],
"creationDate": "2016-11-25T13:50:24+0100",
"updateDate": "2017-01-09T13:51:12+0100",
"type": "CODE_SMELL"
},
"components": [
{
"id": 87163,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"uuid": "AVfTIlxMwczdZ2UaLhnt",
"enabled": true,
"qualifier": "FIL",
"name": "ServerIssueUpdater.java",
"longName": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"path": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"projectId": 23498,
"subProjectId": 23498
},
{
"id": 23498,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"uuid": "8b745480-b598-4e34-af4a-cb2de1808e50",
"enabled": true,
"qualifier": "TRK",
"name": "SonarLint for IntelliJ IDEA",
"longName": "SonarLint for IntelliJ IDEA"
}
],
"rules": [
{
"key": "squid:S2301",
"name": "Public methods should not contain selector arguments",
"lang": "java",
"status": "READY",
"langName": "Java"
}
],
"users": [
{
"login": "john.smith",
"name": "John Smith",
"email": "john.smith@email.com",
"active": true
},
{
"login": "jane.doo",
"name": "Jane Doo",
"email": "jane.doo@mail.net",
"active": true
}
]
}

+ 100
- 0
server/sonar-server/src/main/resources/org/sonar/server/issue/ws/set_type-example.json Zobrazit soubor

@@ -0,0 +1,100 @@
{
"issue": {
"key": "AVibidgv1LF0E-ru2DVv",
"rule": "squid:S2301",
"severity": "MAJOR",
"component": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"componentId": 87163,
"project": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"line": 78,
"textRange": {
"startLine": 78,
"endLine": 78,
"startOffset": 14,
"endOffset": 39
},
"flows": [],
"status": "CONFIRMED",
"message": "Provide multiple methods instead of using \"modal\" to determine which action to take.",
"effort": "15min",
"debt": "15min",
"assignee": "john.smith",
"author": "john.smith@email.com",
"tags": [
"design"
],
"transitions": [
"unconfirm",
"resolve",
"falsepositive",
"wontfix"
],
"actions": [
"comment",
"assign",
"set_tags",
"set_type",
"assign_to_me",
"set_severity"
],
"comments": [
{
"key": "AVmDRx8Zm-z8OYZYRSxo",
"login": "jane.doo",
"htmlText": "Please fix this",
"markdown": "Please fix this",
"updatable": true,
"createdAt": "2017-01-09T13:49:53+0100"
}
],
"creationDate": "2016-11-25T13:50:24+0100",
"updateDate": "2017-01-09T13:51:12+0100",
"type": "CODE_SMELL"
},
"components": [
{
"id": 87163,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"uuid": "AVfTIlxMwczdZ2UaLhnt",
"enabled": true,
"qualifier": "FIL",
"name": "ServerIssueUpdater.java",
"longName": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"path": "src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
"projectId": 23498,
"subProjectId": 23498
},
{
"id": 23498,
"key": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
"uuid": "8b745480-b598-4e34-af4a-cb2de1808e50",
"enabled": true,
"qualifier": "TRK",
"name": "SonarLint for IntelliJ IDEA",
"longName": "SonarLint for IntelliJ IDEA"
}
],
"rules": [
{
"key": "squid:S2301",
"name": "Public methods should not contain selector arguments",
"lang": "java",
"status": "READY",
"langName": "Java"
}
],
"users": [
{
"login": "john.smith",
"name": "John Smith",
"email": "john.smith@email.com",
"active": true
},
{
"login": "jane.doo",
"name": "Jane Doo",
"email": "jane.doo@mail.net",
"active": true
}
]
}

+ 1
- 1
server/sonar-server/src/test/java/org/sonar/server/issue/ws/AddCommentActionTest.java Zobrazit soubor

@@ -175,7 +175,7 @@ public class AddCommentActionTest {
assertThat(action.isPost()).isTrue();
assertThat(action.isInternal()).isFalse();
assertThat(action.params()).hasSize(2);
assertThat(action.responseExample()).isNull();
assertThat(action.responseExample()).isNotNull();
}

private TestResponse call(@Nullable String issueKey, @Nullable String commentText) {

+ 1
- 1
server/sonar-server/src/test/java/org/sonar/server/issue/ws/BulkChangeActionTest.java Zobrazit soubor

@@ -402,7 +402,7 @@ public class BulkChangeActionTest {
assertThat(action.isPost()).isTrue();
assertThat(action.isInternal()).isFalse();
assertThat(action.params()).hasSize(11);
assertThat(action.responseExample()).isNull();
assertThat(action.responseExample()).isNotNull();
}

private BulkChangeWsResponse call(BulkChangeRequest bulkChangeRequest) {

+ 1
- 1
server/sonar-server/src/test/java/org/sonar/server/issue/ws/DeleteCommentActionTest.java Zobrazit soubor

@@ -155,7 +155,7 @@ public class DeleteCommentActionTest {
assertThat(action.isPost()).isTrue();
assertThat(action.isInternal()).isFalse();
assertThat(action.params()).hasSize(1);
assertThat(action.responseExample()).isNull();
assertThat(action.responseExample()).isNotNull();
}

private TestResponse call(@Nullable String commentKey) {

+ 1
- 1
server/sonar-server/src/test/java/org/sonar/server/issue/ws/EditCommentActionTest.java Zobrazit soubor

@@ -189,7 +189,7 @@ public class EditCommentActionTest {
assertThat(action.isPost()).isTrue();
assertThat(action.isInternal()).isFalse();
assertThat(action.params()).hasSize(2);
assertThat(action.responseExample()).isNull();
assertThat(action.responseExample()).isNotNull();
}

private TestResponse call(@Nullable String commentKey, @Nullable String commentText) {

+ 1
- 1
server/sonar-server/src/test/java/org/sonar/server/issue/ws/SetTagsActionTest.java Zobrazit soubor

@@ -53,7 +53,7 @@ public class SetTagsActionTest {
public void should_define() {
Action action = tester.controller("api/issues").action("set_tags");
assertThat(action.description()).isNotEmpty();
assertThat(action.responseExampleAsString()).isNull();
assertThat(action.responseExampleAsString()).isNotEmpty();
assertThat(action.isPost()).isTrue();
assertThat(action.isInternal()).isFalse();
assertThat(action.handler()).isEqualTo(sut);

Načítá se…
Zrušit
Uložit