aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws/src/main/protobuf/ws-issues.proto
blob: fbe07c8ad06be529f922b23921c536133eaf5cc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
// SonarQube, open source software quality management tool.
// Copyright (C) 2008-2015 SonarSource
// mailto:contact AT sonarsource DOT com
//
// SonarQube is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 3 of the License, or (at your option) any later version.
//
// SonarQube is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

syntax = "proto2";

package sonarqube.ws.issues;

import "ws-commons.proto";

option java_package = "org.sonarqube.ws";
option java_outer_classname = "Issues";
option optimize_for = SPEED;

// Response of GET api/issues/search
message Search {
  optional int64 total = 1;
  optional int64 p = 2;
  optional int32 ps = 3;
  optional sonarqube.ws.commons.Paging paging = 4;

  // Total amount of debt, only when the facet "total" is enabled
  optional int64 debtTotal = 5;

  repeated Issue issues = 6;
  repeated Component components = 7;
  optional bool rulesPresentIfEmpty = 8;
  repeated sonarqube.ws.commons.Rule rules = 9;
  optional bool usersPresentIfEmpty = 10;
  repeated sonarqube.ws.commons.User users = 11;
  optional bool actionPlansPresentIfEmpty = 12;
  repeated ActionPlan actionPlans = 13;
  optional bool languagesPresentIfEmpty = 14;
  repeated Language languages = 15;
  optional bool facetsPresentIfEmpty = 16;
  repeated sonarqube.ws.commons.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 sonarqube.ws.commons.Rule rules = 3;
  repeated sonarqube.ws.commons.User users = 4;
  repeated ActionPlan actionPlans = 5;
}


message Issue {
  optional string key = 1;
  optional string rule = 2;
  optional sonarqube.ws.commons.Severity severity = 3;
  optional string component = 4;
  optional int64 componentId = 5;
  optional string project = 6;
  optional string subProject = 7;
  optional int32 line = 8;
  optional sonarqube.ws.commons.TextRange textRange = 9;
  repeated Location secondaryLocations = 10;
  repeated ExecutionFlow executionFlows = 11;
  optional string resolution = 12;
  optional string status = 13;
  optional string message = 14;
  optional string debt = 15;
  optional string assignee = 16;
  optional string reporter = 17;

  // SCM login of the committer who introduced the issue
  optional string author = 18;

  optional string actionPlan = 19;
  optional bool tagsPresentIfEmpty = 20;
  repeated string tags = 21;

  // the transitions allowed for the requesting user.
  optional bool transitionsPresentIfEmpty = 22;
  repeated string transitions = 23;

  // the actions allowed for the requesting user.
  optional bool actionsPresentIfEmpty = 24;
  repeated string actions = 25;

  optional bool commentsPresentIfEmpty = 26;
  repeated Comment comments = 27;
  optional string creationDate = 28;
  optional string updateDate = 29;
  optional string fUpdateAge = 30;
  optional string closeDate = 31;
}

message ExecutionFlow {
  repeated Location locations = 1;
}

message Location {
  optional string componentId = 1;
  // Only when component is a file. Can be empty for a file if this is an issue global to the file.
  optional sonarqube.ws.commons.TextRange textRange = 2;
  optional string msg = 3;
}

message Comment {
  optional string key = 1;
  optional string login = 2;
  // TODO drop, it's already in field "users"
  optional string email = 3;
  // TODO drop, it's already in field "users"
  optional string userName = 4;
  optional string htmlText = 5;
  // TODO rename markdownText ?
  optional string markdown = 6;
  optional bool updatable = 7;
  optional string createdAt = 8;
}

message ActionPlan {
  optional string key = 1;
  optional string name = 2;

  // TODO define enum
  optional string status = 3;
  optional string deadLine = 4;
  // TODO to be renamed, is it id or key ?
  optional string project = 5;
}

message Language {
  optional string key = 1;
  optional string name = 2;
}

message Component {
  optional int64 id = 1;
  optional string key = 2;
  optional string uuid = 3;
  optional bool enabled = 4;
  optional string qualifier = 5;
  optional string name = 6;
  optional string longName = 7;
  optional string path = 8;
  optional int64 projectId = 9;
  optional int64 subProjectId = 10;
}