Add @SecurityRequirement annotation to PersistenceResource::httpPutPersistenceItemData function (#2406)

Signed-off-by: Paul Vogel <github@paulvogel.me>
This commit is contained in:
Paul Vogel 2021-06-21 12:59:24 +02:00 committed by GitHub
parent f58fce3500
commit 5cc76378a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -199,9 +199,10 @@ public class PersistenceResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/items/{itemname: [a-zA-Z_0-9]+}")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(operationId = "storeItemDataInPersistenceService", summary = "Stores item persistence data into the persistence service.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Unknown Item or persistence service") })
@Operation(operationId = "storeItemDataInPersistenceService", summary = "Stores item persistence data into the persistence service.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Unknown Item or persistence service") })
public Response httpPutPersistenceItemData(@Context HttpHeaders headers,
@Parameter(description = "Id of the persistence service. If not provided the default service will be used") @QueryParam("serviceId") @Nullable String serviceId,
@Parameter(description = "The item name.") @PathParam("itemname") String itemName,