aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws/src/main/protobuf
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-08-03 23:52:35 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-08-05 19:32:12 +0200
commit31b625fdf1a0ef6682940e8caf20cb047126e4f1 (patch)
tree099a8b0d9a418b30b4d6f84e2260a7280113baa0 /sonar-ws/src/main/protobuf
parentcf4c403a4360a05a8af636466c52195b3aa9912f (diff)
downloadsonarqube-31b625fdf1a0ef6682940e8caf20cb047126e4f1.tar.gz
sonarqube-31b625fdf1a0ef6682940e8caf20cb047126e4f1.zip
Improve response of POST api/issues/assign
Return the same format as for api/issues/search, except that: - field "issues" is replaced by "issue" - of course there are no facets nor paging - field "languages" is not present (that should be dropped from api/issues/search too)
Diffstat (limited to 'sonar-ws/src/main/protobuf')
-rw-r--r--sonar-ws/src/main/protobuf/ws-common.proto7
-rw-r--r--sonar-ws/src/main/protobuf/ws-issues.proto86
2 files changed, 48 insertions, 45 deletions
diff --git a/sonar-ws/src/main/protobuf/ws-common.proto b/sonar-ws/src/main/protobuf/ws-common.proto
index a269ff7f4be..f61123e7715 100644
--- a/sonar-ws/src/main/protobuf/ws-common.proto
+++ b/sonar-ws/src/main/protobuf/ws-common.proto
@@ -66,11 +66,8 @@ message Rule {
optional string key = 1;
optional string name = 2;
optional string lang = 3;
- // TODO what's the format ?
- optional string desc = 4;
- optional RuleStatus status = 5;
- // TODO missing 'lang'
- optional string langName = 6;
+ optional RuleStatus status = 4;
+ optional string langName = 5;
}
enum RuleStatus {
diff --git a/sonar-ws/src/main/protobuf/ws-issues.proto b/sonar-ws/src/main/protobuf/ws-issues.proto
index 40c9c9daa77..3183973316b 100644
--- a/sonar-ws/src/main/protobuf/ws-issues.proto
+++ b/sonar-ws/src/main/protobuf/ws-issues.proto
@@ -26,10 +26,8 @@ option java_package = "org.sonarqube.ws";
option java_outer_classname = "Issues";
option optimize_for = SPEED;
-// Response of URL api/issues/search
+// Response of GET api/issues/search
message Search {
- // TODO errors
-
optional int64 total = 1;
optional int64 p = 2;
optional int32 ps = 3;
@@ -39,22 +37,29 @@ message Search {
optional int64 debtTotal = 5;
repeated Issue issues = 6;
- optional bool projectsPresentIfEmpty = 8;
- repeated Component projects = 9;
- optional bool componentsPresentIfEmpty = 10;
- repeated Component components = 11;
- optional bool rulesPresentIfEmpty = 12;
- repeated Rule rules = 13;
- optional bool usersPresentIfEmpty = 14;
- repeated User users = 15;
- optional bool actionPlansPresentIfEmpty = 16;
- repeated ActionPlan actionPlans = 17;
- optional bool languagesPresentIfEmpty = 18;
- repeated Language languages = 19;
- repeated Facet facets = 20;
- optional bool facetsPresentIfEmpty = 21;
+ repeated Component components = 7;
+ optional bool rulesPresentIfEmpty = 8;
+ repeated Rule rules = 9;
+ optional bool usersPresentIfEmpty = 10;
+ repeated User users = 11;
+ optional bool actionPlansPresentIfEmpty = 12;
+ repeated ActionPlan actionPlans = 13;
+ optional bool languagesPresentIfEmpty = 14;
+ repeated Language languages = 15;
+ optional bool facetsPresentIfEmpty = 16;
+ repeated Facet facets = 17;
+}
+
+// Response of most of POST/issues/{operation}, for instance assign, add_comment and set_severity
+message Operation {
+ optional Issue issue = 1;
+ repeated Component components = 2;
+ repeated Rule rules = 3;
+ repeated User users = 4;
+ repeated ActionPlan actionPlans = 5;
}
+
message Issue {
optional string key = 1;
optional string rule = 2;
@@ -62,36 +67,37 @@ message Issue {
optional string component = 4;
optional int64 componentId = 5;
optional string project = 6;
- optional int32 line = 7;
- optional string resolution = 8;
- optional string status = 9;
- optional string message = 10;
- optional string debt = 11;
- optional string assignee = 12;
- optional string reporter = 13;
+ optional string subProject = 7;
+ optional int32 line = 8;
+ optional string resolution = 9;
+ optional string status = 10;
+ optional string message = 11;
+ optional string debt = 12;
+ optional string assignee = 13;
+ optional string reporter = 14;
// SCM login of the committer who introduced the issue
- optional string author = 14;
+ optional string author = 15;
- optional string actionPlan = 15;
- optional string actionPlanName = 16;
- optional string attr = 17;
- repeated string tags = 18;
+ optional string actionPlan = 16;
+ optional string actionPlanName = 17;
+ optional string attr = 18;
+ repeated string tags = 19;
// the transitions allowed for the requesting user.
- optional bool transitionsPresentIfEmpty=19;
- repeated string transitions = 20;
+ optional bool transitionsPresentIfEmpty = 20;
+ repeated string transitions = 21;
// the actions allowed for the requesting user.
- optional bool actionsPresentIfEmpty=21;
- repeated string actions = 22;
-
- optional bool commentsPresentIfEmpty = 23;
- repeated Comment comments = 24;
- optional string creationDate= 25;
- optional string updateDate= 26;
- optional string fUpdateAge= 27;
- optional string closeDate= 28;
+ optional bool actionsPresentIfEmpty = 22;
+ repeated string actions = 23;
+
+ optional bool commentsPresentIfEmpty = 24;
+ repeated Comment comments = 25;
+ optional string creationDate = 26;
+ optional string updateDate = 27;
+ optional string fUpdateAge = 28;
+ optional string closeDate = 29;
}
message Comment {