You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ws-issues.proto 8.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. // SonarQube, open source software quality management tool.
  2. // Copyright (C) 2008-2016 SonarSource
  3. // mailto:contact AT sonarsource DOT com
  4. //
  5. // SonarQube is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU Lesser General Public
  7. // License as published by the Free Software Foundation; either
  8. // version 3 of the License, or (at your option) any later version.
  9. //
  10. // SonarQube is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. // Lesser General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Lesser General Public License
  16. // along with this program; if not, write to the Free Software Foundation,
  17. // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. syntax = "proto2";
  19. package sonarqube.ws.issues;
  20. import "ws-commons.proto";
  21. option java_package = "org.sonarqube.ws";
  22. option java_outer_classname = "Issues";
  23. option optimize_for = SPEED;
  24. // Response of GET api/issues/search
  25. message SearchWsResponse {
  26. reserved 5;
  27. reserved 1;
  28. reserved 2;
  29. reserved 3;
  30. optional sonarqube.ws.commons.Paging paging = 4;
  31. // Total amount of effort, only when the facet "total" is enabled
  32. optional int64 effortTotal = 13;
  33. repeated Issue issues = 6;
  34. repeated Component components = 7;
  35. optional sonarqube.ws.commons.Rules rules = 8;
  36. optional Users users = 9;
  37. // Deprecated since 5.5, action plan has been removed
  38. optional ActionPlans unusedActionPlans = 10;
  39. optional Languages languages = 11;
  40. optional sonarqube.ws.commons.Facets facets = 12;
  41. }
  42. message Operation {
  43. optional Issue issue = 1;
  44. repeated Component components = 2;
  45. repeated sonarqube.ws.commons.Rule rules = 3;
  46. repeated sonarqube.ws.commons.User users = 4;
  47. }
  48. message AddCommentResponse {
  49. optional Issue issue = 1;
  50. repeated Component components = 2;
  51. repeated sonarqube.ws.commons.Rule rules = 3;
  52. repeated sonarqube.ws.commons.User users = 4;
  53. }
  54. message AssignResponse {
  55. optional Issue issue = 1;
  56. repeated Component components = 2;
  57. repeated sonarqube.ws.commons.Rule rules = 3;
  58. repeated sonarqube.ws.commons.User users = 4;
  59. }
  60. message DeleteCommentResponse {
  61. optional Issue issue = 1;
  62. repeated Component components = 2;
  63. repeated sonarqube.ws.commons.Rule rules = 3;
  64. repeated sonarqube.ws.commons.User users = 4;
  65. }
  66. message DoTransitionResponse {
  67. optional Issue issue = 1;
  68. repeated Component components = 2;
  69. repeated sonarqube.ws.commons.Rule rules = 3;
  70. repeated sonarqube.ws.commons.User users = 4;
  71. }
  72. message SetSeverityResponse {
  73. optional Issue issue = 1;
  74. repeated Component components = 2;
  75. repeated sonarqube.ws.commons.Rule rules = 3;
  76. repeated sonarqube.ws.commons.User users = 4;
  77. }
  78. message SetTagsResponse {
  79. optional Issue issue = 1;
  80. repeated Component components = 2;
  81. repeated sonarqube.ws.commons.Rule rules = 3;
  82. repeated sonarqube.ws.commons.User users = 4;
  83. }
  84. message SetTypeResponse {
  85. optional Issue issue = 1;
  86. repeated Component components = 2;
  87. repeated sonarqube.ws.commons.Rule rules = 3;
  88. repeated sonarqube.ws.commons.User users = 4;
  89. }
  90. message TagsResponse {
  91. repeated string tags = 1;
  92. }
  93. message Issue {
  94. reserved 29; //drop organization
  95. optional string key = 1;
  96. optional string rule = 2;
  97. optional sonarqube.ws.commons.Severity severity = 3;
  98. optional string component = 4;
  99. optional int64 unusedComponentId = 5;
  100. optional string project = 6;
  101. reserved 7; // drop subProject
  102. optional int32 line = 8;
  103. optional string hash = 31;
  104. optional sonarqube.ws.commons.TextRange textRange = 9;
  105. repeated sonarqube.ws.commons.Flow flows = 10;
  106. optional string resolution = 11;
  107. optional string status = 12;
  108. optional string message = 13;
  109. optional string effort = 28;
  110. // Deprecated since 5.5, replaced by effort
  111. optional string debt = 14;
  112. optional string assignee = 15;
  113. // Unused since 5.5, manual issues feature has been removed
  114. optional string unusedReporter = 16;
  115. // SCM login of the committer who introduced the issue
  116. optional string author = 17;
  117. // Deprecated since 5.5, action plan has been removed
  118. optional string actionPlan = 18;
  119. repeated string tags = 19;
  120. // the transitions allowed for the requesting user.
  121. optional Transitions transitions = 20;
  122. // the actions allowed for the requesting user.
  123. optional Actions actions = 21;
  124. optional Comments comments = 22;
  125. optional string creationDate = 23;
  126. optional string updateDate = 24;
  127. optional string fUpdateAge = 25;
  128. optional string closeDate = 26;
  129. optional sonarqube.ws.commons.RuleType type = 27;
  130. optional string branch = 30;
  131. optional string pullRequest = 32;
  132. optional string externalRuleEngine = 33;
  133. reserved 34; //drop fromHotspot
  134. optional string scope = 35;
  135. optional bool quickFixAvailable = 36;
  136. optional string ruleDescriptionContextKey = 37;
  137. repeated sonarqube.ws.commons.MessageFormatting messageFormattings = 38;
  138. repeated string codeVariants = 39;
  139. }
  140. message Transitions {
  141. repeated string transitions = 1;
  142. }
  143. message Actions {
  144. repeated string actions = 1;
  145. }
  146. message Comments {
  147. repeated sonarqube.ws.commons.Comment comments = 1;
  148. }
  149. // Deprecated since 5.5
  150. message ActionPlan {
  151. optional string key = 1;
  152. optional string name = 2;
  153. // TODO define enum
  154. optional string status = 3;
  155. optional string deadLine = 4;
  156. // TODO to be renamed, is it id or key ?
  157. optional string project = 5;
  158. }
  159. // Deprecated since 5.5
  160. message ActionPlans {
  161. repeated ActionPlan actionPlans = 1;
  162. }
  163. message Language {
  164. optional string key = 1;
  165. optional string name = 2;
  166. }
  167. message Languages {
  168. repeated Language languages = 1;
  169. }
  170. message Component {
  171. reserved 3, 11; //drop organization
  172. optional int64 deprecatedId = 1;
  173. optional string key = 2;
  174. optional bool enabled = 4;
  175. optional string qualifier = 5;
  176. optional string name = 6;
  177. optional string longName = 7;
  178. optional string path = 8;
  179. optional int64 unusedProjectId = 9;
  180. optional int64 unusedSubProjectId = 10;
  181. optional string branch = 12;
  182. optional string pullRequest = 13;
  183. }
  184. // Response of GET api/issues/changelog
  185. message ChangelogWsResponse {
  186. repeated sonarqube.ws.commons.Changelog changelog = 1;
  187. }
  188. // Response of POST api/issues/bulk_change
  189. message BulkChangeWsResponse {
  190. optional int64 total = 1;
  191. optional int64 success = 2;
  192. optional int64 ignored = 3;
  193. optional int64 failures = 4;
  194. }
  195. message Users {
  196. repeated sonarqube.ws.commons.User users = 1;
  197. }
  198. // Response of GET api/issues/authors
  199. message AuthorsResponse {
  200. repeated string authors = 1;
  201. }
  202. // Response of GET api/issues/pull
  203. message IssuesPullQueryTimestamp {
  204. required int64 queryTimestamp = 1;
  205. }
  206. message TextRange {
  207. optional int32 startLine = 1;
  208. optional int32 startLineOffset = 2;
  209. optional int32 endLine = 3;
  210. optional int32 endLineOffset = 4;
  211. optional string hash = 5;
  212. }
  213. message Location {
  214. optional string filePath = 1;
  215. optional string message = 2;
  216. optional TextRange textRange = 3;
  217. repeated sonarqube.ws.commons.MessageFormatting messageFormattings = 4;
  218. }
  219. message IssueLite {
  220. required string key = 1;
  221. optional int64 creationDate = 2;
  222. optional bool resolved = 3;
  223. optional string ruleKey = 4;
  224. optional sonarqube.ws.commons.Severity userSeverity = 5;
  225. optional sonarqube.ws.commons.RuleType type = 6;
  226. optional Location mainLocation = 7;
  227. optional bool closed = 8;
  228. }
  229. // Response of GET api/issues/pull_taint
  230. message TaintVulnerabilityPullQueryTimestamp {
  231. required int64 queryTimestamp = 1;
  232. }
  233. message TaintVulnerabilityLite {
  234. required string key = 1;
  235. optional int64 creationDate = 2;
  236. optional bool resolved = 3;
  237. optional string ruleKey = 4;
  238. optional sonarqube.ws.commons.Severity severity = 5;
  239. optional sonarqube.ws.commons.RuleType type = 6;
  240. optional Location mainLocation = 7;
  241. optional bool closed = 8;
  242. repeated Flow flows = 9;
  243. optional bool assignedToSubscribedUser = 10;
  244. optional string ruleDescriptionContextKey = 11;
  245. }
  246. message Flow {
  247. repeated Location locations = 1;
  248. optional string description = 2;
  249. optional sonarqube.ws.commons.FlowType type = 3;
  250. }
  251. // Response of GET api/issues/list
  252. message ListWsResponse {
  253. optional sonarqube.ws.commons.Paging paging = 1;
  254. repeated Issue issues = 2;
  255. repeated Component components = 3;
  256. }