RuleResource: Add schema specification for "Location" header (#2421)

Signed-off-by: Paul Vogel <github@paulvogel.me>
pull/2411/head
Paul Vogel 2021-07-05 23:09:17 +02:00 committed by GitHub
parent b2336a53fd
commit 7e5bf34d9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -173,7 +173,7 @@ public class RuleResource implements RESTResource {
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Operation(operationId = "createRule", summary = "Creates a rule.", responses = {
@ApiResponse(responseCode = "201", description = "Created", headers = @Header(name = "Location", description = "Newly created Rule")),
@ApiResponse(responseCode = "201", description = "Created", headers = @Header(name = "Location", description = "Newly created Rule", schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "409", description = "Creation of the rule is refused. Rule with the same UID already exists."),
@ApiResponse(responseCode = "400", description = "Creation of the rule is refused. Missing required parameter.") })
public Response create(@Parameter(description = "rule data", required = true) RuleDTO rule) throws IOException {