From: Lukasz Jarocki Date: Thu, 2 Jun 2022 14:06:30 +0000 (+0200) Subject: NO-JIRA adding missing response example in the internal endpoint X-Git-Tag: 9.5.0.56709~37 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=877e5bb72c09153a7866cbec449f49542266a9a5;p=sonarqube.git NO-JIRA adding missing response example in the internal endpoint --- diff --git a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/PullAction.java b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/PullAction.java index 269689afc4b..660f74d6d4c 100644 --- a/server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/PullAction.java +++ b/server/sonar-webserver-webapi/src/main/java/org/sonar/server/issue/ws/PullAction.java @@ -65,6 +65,7 @@ public class PullAction implements IssuesWsAction { .createAction(ACTION_PULL) .setHandler(this) .setInternal(true) + .setResponseExample(getClass().getResource("pull-example.proto")) .setDescription("This endpoint fetches and returns all (unless filtered by optional params) the issues for a given branch." + "The issues returned are not paginated, so the response size can be big.") .setSince("9.5"); diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/issue/ws/pull-example.proto b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/issue/ws/pull-example.proto new file mode 100644 index 00000000000..62358e1afb5 --- /dev/null +++ b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/issue/ws/pull-example.proto @@ -0,0 +1,29 @@ +# The response contains a single protocol buffer message: IssuesPullQueryTimestamp followed by 0..n number of IssueLite protocol buffer messages. +message IssuesPullQueryTimestamp { + required int64 queryTimestamp = 1; +} + +message IssueLite { + required string key = 1; + optional int64 creationDate = 2; + optional bool resolved = 3; + optional string ruleKey = 4; + optional string userSeverity = 5; + optional string type = 6; + optional Location mainLocation = 7; + optional bool closed = 8; +} + +message Location { + optional string filePath = 1; + optional string message = 2; + optional TextRange textRange = 3; +} + +message TextRange { + optional int32 startLine = 1; + optional int32 startLineOffset = 2; + optional int32 endLine = 3; + optional int32 endLineOffset = 4; + optional string hash = 5; +} \ No newline at end of file