Skip to content

Commit

Permalink
Merge pull request #4 from cqse/cr/enforce_json_result
Browse files Browse the repository at this point in the history
Cr/enforce json result
  • Loading branch information
pfaller authored May 5, 2020
2 parents e31ef4c + 05fd214 commit 49a63ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Path;

Expand All @@ -14,6 +15,7 @@ public interface IJiraAPI {
* Creates a new {@link Issue}, the issue key and id is contained in the
* returned response.
*/
@Headers({"Accept: application/json"})
@POST("/rest/api/2/issue/")
Call<IssueResponse> createIssue(@Body Issue issue);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.PUT;
import retrofit2.http.Path;

Expand All @@ -15,12 +16,14 @@ public interface ITeamscaleAPI {
/**
* Gets all tasks for a project
*/
@Headers({"Accept: application/json"})
@GET("/api/projects/{project}/tasks")
Call<List<Task>> getTasks(@Path("project") String project);

/**
* Updates a task, e.g. to add Link to Jira
*/
@Headers({"Accept: application/json"})
@PUT("/api/projects/{project}/tasks/{id}?keep-findings=true")
Call<Task> updateTask(@Path("project") String project, @Path("id") int taskId, @Body Task task);
}

0 comments on commit 49a63ce

Please sign in to comment.