]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-21376 Update response examples on api/issues endpoints
authorEric Giffon <eric.giffon@sonarsource.com>
Fri, 29 Dec 2023 14:56:58 +0000 (15:56 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 29 Dec 2023 20:02:27 +0000 (20:02 +0000)
server/sonar-webserver-webapi/src/main/resources/org/sonar/server/issue/ws/add_comment-example.json
server/sonar-webserver-webapi/src/main/resources/org/sonar/server/issue/ws/assign-example.json
server/sonar-webserver-webapi/src/main/resources/org/sonar/server/issue/ws/delete_comment-example.json
server/sonar-webserver-webapi/src/main/resources/org/sonar/server/issue/ws/do_transition-example.json
server/sonar-webserver-webapi/src/main/resources/org/sonar/server/issue/ws/edit_comment-example.json
server/sonar-webserver-webapi/src/main/resources/org/sonar/server/issue/ws/list-example.json [new file with mode: 0644]
server/sonar-webserver-webapi/src/main/resources/org/sonar/server/issue/ws/search-example.json
server/sonar-webserver-webapi/src/main/resources/org/sonar/server/issue/ws/set_tags-example.json

index 3b875527b442048c82d9e023302987f90a6a8d1a..df66e627ddaf35acfd3741494a8a261133644e53 100644 (file)
@@ -10,7 +10,6 @@
         "severity": "HIGH"
       }
     ],
-    "severity": "MAJOR",
     "component": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
     "project": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
     "line": 78,
@@ -21,8 +20,7 @@
       "endOffset": 39
     },
     "flows": [],
-    "status": "CONFIRMED",
-    "issueStatus": "CONFIRMED",
+    "issueStatus": "ACCEPTED",
     "message": "Provide multiple methods instead of using \"modal\" to determine which action to take.",
     "effort": "15min",
     "debt": "15min",
@@ -56,7 +54,6 @@
     ],
     "creationDate": "2016-11-25T13:50:24+0100",
     "updateDate": "2017-01-09T13:51:12+0100",
-    "type": "CODE_SMELL",
     "ruleDescriptionContextKey": "spring"
   },
   "components": [
index 8d5c74145fbdaf81c1b326aa299418491745758c..3a1bfed248804a6e38c7fa1d226ad8ac7fe38e2b 100644 (file)
@@ -2,7 +2,6 @@
   "issue": {
     "key": "AVibidgv1LF0E-ru2DVv",
     "rule": "squid:S2301",
-    "severity": "MAJOR",
     "cleanCodeAttribute": "CLEAR",
     "cleanCodeAttributeCategory": "INTENTIONAL",
     "impacts": [
@@ -21,8 +20,7 @@
       "endOffset": 39
     },
     "flows": [],
-    "status": "CONFIRMED",
-    "issueStatus": "CONFIRMED",
+    "issueStatus": "ACCEPTED",
     "message": "Provide multiple methods instead of using \"modal\" to determine which action to take.",
     "effort": "15min",
     "debt": "15min",
@@ -56,7 +54,6 @@
     ],
     "creationDate": "2016-11-25T13:50:24+0100",
     "updateDate": "2017-01-09T13:51:12+0100",
-    "type": "CODE_SMELL",
     "ruleDescriptionContextKey": "spring"
   },
   "components": [
index bb83a47001f6424b20f50994882c12f7013aaa3b..3a1bfed248804a6e38c7fa1d226ad8ac7fe38e2b 100644 (file)
@@ -10,7 +10,6 @@
         "severity": "HIGH"
       }
     ],
-    "severity": "MAJOR",
     "component": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
     "project": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
     "line": 78,
@@ -21,8 +20,7 @@
       "endOffset": 39
     },
     "flows": [],
-    "status": "CONFIRMED",
-    "issueStatus": "CONFIRMED",
+    "issueStatus": "ACCEPTED",
     "message": "Provide multiple methods instead of using \"modal\" to determine which action to take.",
     "effort": "15min",
     "debt": "15min",
@@ -56,7 +54,6 @@
     ],
     "creationDate": "2016-11-25T13:50:24+0100",
     "updateDate": "2017-01-09T13:51:12+0100",
-    "type": "CODE_SMELL",
     "ruleDescriptionContextKey": "spring"
   },
   "components": [
index bb83a47001f6424b20f50994882c12f7013aaa3b..3a1bfed248804a6e38c7fa1d226ad8ac7fe38e2b 100644 (file)
@@ -10,7 +10,6 @@
         "severity": "HIGH"
       }
     ],
-    "severity": "MAJOR",
     "component": "org.sonarsource.sonarlint.intellij:sonarlint-intellij:src/main/java/org/sonarlint/intellij/core/ServerIssueUpdater.java",
     "project": "org.sonarsource.sonarlint.intellij:sonarlint-intellij",
     "line": 78,
@@ -21,8 +20,7 @@
       "endOffset": 39
     },
     "flows": [],
-    "status": "CONFIRMED",
-    "issueStatus": "CONFIRMED",
+    "issueStatus": "ACCEPTED",
     "message": "Provide multiple methods instead of using \"modal\" to determine which action to take.",
     "effort": "15min",
     "debt": "15min",
@@ -56,7 +54,6 @@
     ],
     "creationDate": "2016-11-25T13:50:24+0100",
     "updateDate": "2017-01-09T13:51:12+0100",
-    "type": "CODE_SMELL",
     "ruleDescriptionContextKey": "spring"
   },
   "components": [
index 8d5c74145fbdaf81c1b326aa299418491745758c..3a1bfed248804a6e38c7fa1d226ad8ac7fe38e2b 100644 (file)
@@ -2,7 +2,6 @@
   "issue": {
     "key": "AVibidgv1LF0E-ru2DVv",
     "rule": "squid:S2301",
-    "severity": "MAJOR",
     "cleanCodeAttribute": "CLEAR",
     "cleanCodeAttributeCategory": "INTENTIONAL",
     "impacts": [
@@ -21,8 +20,7 @@
       "endOffset": 39
     },
     "flows": [],
-    "status": "CONFIRMED",
-    "issueStatus": "CONFIRMED",
+    "issueStatus": "ACCEPTED",
     "message": "Provide multiple methods instead of using \"modal\" to determine which action to take.",
     "effort": "15min",
     "debt": "15min",
@@ -56,7 +54,6 @@
     ],
     "creationDate": "2016-11-25T13:50:24+0100",
     "updateDate": "2017-01-09T13:51:12+0100",
-    "type": "CODE_SMELL",
     "ruleDescriptionContextKey": "spring"
   },
   "components": [
diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/issue/ws/list-example.json b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/issue/ws/list-example.json
new file mode 100644 (file)
index 0000000..33e107b
--- /dev/null
@@ -0,0 +1,125 @@
+{
+  "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": "java:S1144",
+      "cleanCodeAttribute": "CLEAR",
+      "cleanCodeAttributeCategory": "INTENTIONAL",
+      "issueStatus": "ACCEPTED",
+      "impacts": [
+        {
+          "softwareQuality": "SECURITY",
+          "severity": "HIGH"
+        }
+      ],
+      "message": "Remove this unused private \"getKee\" method.",
+      "messageFormattings": [
+        {
+          "start": 0,
+          "end": 4,
+          "type": "CODE"
+        }
+      ],
+      "line": 81,
+      "hash": "a227e508d6646b55a086ee11d63b21e9",
+      "author": "Developer 1",
+      "effort": "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 &quot;public&quot;!",
+          "markdown": "Must be \"public\"!",
+          "updatable": false,
+          "createdAt": "2013-05-13T18:08:34+0200"
+        }
+      ],
+      "attr": {
+        "jira-issue-key": "SONAR-1234"
+      },
+      "transitions": [
+        "reopen"
+      ],
+      "actions": [
+        "comment"
+      ],
+      "textRange": {
+        "startLine": 2,
+        "endLine": 2,
+        "startOffset": 0,
+        "endOffset": 204
+      },
+      "flows": [
+        {
+          "locations": [
+            {
+              "textRange": {
+                "startLine": 16,
+                "endLine": 16,
+                "startOffset": 0,
+                "endOffset": 30
+              },
+              "msg": "Expected position: 5",
+              "msgFormattings": [
+                {
+                  "start": 0,
+                  "end": 4,
+                  "type": "CODE"
+                }
+              ]
+            }
+          ]
+        },
+        {
+          "locations": [
+            {
+              "textRange": {
+                "startLine": 15,
+                "endLine": 15,
+                "startOffset": 0,
+                "endOffset": 37
+              },
+              "msg": "Expected position: 6",
+              "msgFormattings": []
+            }
+          ]
+        }
+      ],
+      "quickFixAvailable": false,
+      "ruleDescriptionContextKey": "spring",
+      "codeVariants": [
+        "windows",
+        "linux"
+      ]
+    }
+  ],
+  "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"
+    }
+  ]
+}
index 65306904b5c9abf7a3576f1479419c7bf056c953..14f912426683e6803e9cffd0d2b5dae0e3d24d75 100644 (file)
@@ -10,9 +10,6 @@
       "component": "com.github.kevinsawicki:http-request:com.github.kevinsawicki.http.HttpRequest",
       "project": "com.github.kevinsawicki:http-request",
       "rule": "java:S1144",
-      "status": "RESOLVED",
-      "resolution": "WONTFIX",
-      "severity": "MAJOR",
       "cleanCodeAttribute": "CLEAR",
       "cleanCodeAttributeCategory": "INTENTIONAL",
       "issueStatus": "ACCEPTED",
@@ -39,7 +36,6 @@
       "tags": [
         "bug"
       ],
-      "type": "CODE_SMELL",
       "comments": [
         {
           "key": "7d7c56f5-7b5a-41b9-87f8-36fa70caa5ba",
       "active": true,
       "avatar": "ab0ec6adc38ad44a15105f207394946f"
     }
+  ],
+  "facets": [
+    {
+      "property": "cleanCodeAttributeCategories",
+      "values": [
+        {
+          "val": "INTENTIONAL",
+          "count": 6912
+        },
+        {
+          "val": "CONSISTENT",
+          "count": 4950
+        },
+        {
+          "val": "ADAPTABLE",
+          "count": 899
+        },
+        {
+          "val": "RESPONSIBLE",
+          "count": 27
+        }
+      ]
+    },
+    {
+      "property": "impactSeverities",
+      "values": [
+        {
+          "val": "HIGH",
+          "count": 435
+        },
+        {
+          "val": "LOW",
+          "count": 7858
+        },
+        {
+          "val": "MEDIUM",
+          "count": 4495
+        }
+      ]
+    }
   ]
 }
index ac3bf2c81a9c35052a9da20af462e818833a4b09..58e7c0b084a7b4117ddf350e30b17dfddab3330a 100644 (file)
@@ -2,7 +2,6 @@
   "issue": {
     "key": "AVibidgv1LF0E-ru2DVv",
     "rule": "squid:S2301",
-    "severity": "MAJOR",
     "cleanCodeAttribute": "CLEAR",
     "cleanCodeAttributeCategory": "INTENTIONAL",
     "impacts": [
@@ -21,7 +20,7 @@
       "endOffset": 39
     },
     "flows": [],
-    "status": "CONFIRMED",
+    "issueStatus": "ACCEPTED",
     "message": "Provide multiple methods instead of using \"modal\" to determine which action to take.",
     "effort": "15min",
     "debt": "15min",
@@ -55,7 +54,6 @@
     ],
     "creationDate": "2016-11-25T13:50:24+0100",
     "updateDate": "2017-01-09T13:51:12+0100",
-    "type": "CODE_SMELL",
     "ruleDescriptionContextKey": "spring"
   },
   "components": [