Skip to content

Commit

Permalink
server: Add swagger documentation for 204 response
Browse files Browse the repository at this point in the history
This is the only case of trace-server returning such a response
specifically. This case can be covered by [1]'s new python-client test.

[1] eclipse-cdt-cloud/tsp-python-client#47

Change-Id: I6805b2afce9e19ecaad8e8230b1d685fef75e7f6
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass.incubator/org.eclipse.tracecompass.incubator/+/191373
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
  • Loading branch information
marco-miller committed Mar 3, 2022
1 parent aec951d commit 08bec96
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ public Response deleteExperiment(@Parameter(description = EXP_UUID) @PathParam("
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Create a new experiment on the server", responses = {
@ApiResponse(responseCode = "200", description = "The experiment was successfully created", content = @Content(schema = @Schema(implementation = IExperiment.class)))
@ApiResponse(responseCode = "200", description = "The experiment was successfully created", content = @Content(schema = @Schema(implementation = IExperiment.class))),
@ApiResponse(responseCode = "204", description = "The experiment has at least one trace which hasn't been created yet", content = @Content(schema = @Schema(implementation = String.class)))
})
public Response postExperiment(@RequestBody(content = {
@Content(schema = @Schema(implementation = IExperimentQueryParameters.class))
Expand Down

0 comments on commit 08bec96

Please sign in to comment.