Skip to content

Commit

Permalink
server: Add swagger doc for serviced 409 responses
Browse files Browse the repository at this point in the history
Add new descriptions for these, as none previously existed, since these
cases were not described that way before.

Change-Id: Ia003a153a28a1a705c4943093731a1bffe9d720b
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass.incubator/org.eclipse.tracecompass.incubator/+/191419
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 authored and MatthewKhouzam committed Mar 11, 2022
1 parent 18f12d0 commit 58f9e85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -262,7 +262,8 @@ public Response deleteExperiment(@Parameter(description = EXP_UUID) @PathParam("
@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 = "204", description = "The experiment has at least one trace which hasn't been created yet", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "400", description = INVALID_PARAMETERS, content = @Content(schema = @Schema(implementation = String.class)))
@ApiResponse(responseCode = "400", description = INVALID_PARAMETERS, content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "409", description = "The experiment (name) already exists and both differ", content = @Content(schema = @Schema(implementation = String.class)))
})
public Response postExperiment(@RequestBody(content = {
@Content(schema = @Schema(implementation = IExperimentQueryParameters.class))
Expand Down
Expand Up @@ -385,7 +385,8 @@ public Response getTrace(@Parameter(description = TRACE_UUID) @PathParam("uuid")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Remove a trace from the server and disk", responses = {
@ApiResponse(responseCode = "200", description = "The trace was successfully deleted", content = @Content(schema = @Schema(implementation = ITrace.class))),
@ApiResponse(responseCode = "404", description = NO_SUCH_TRACE, content = @Content(schema = @Schema(implementation = String.class)))
@ApiResponse(responseCode = "404", description = NO_SUCH_TRACE, content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "409", description = "The trace is in use by at least one experiment thus cannot be deleted", content = @Content(schema = @Schema(implementation = String.class)))
})
public Response deleteTrace(@Parameter(description = TRACE_UUID) @PathParam("uuid") @NotNull UUID uuid) {
Trace trace = createTraceModel(uuid);
Expand Down

0 comments on commit 58f9e85

Please sign in to comment.