mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-25 19:55:48 +01:00
Add @SecurityRequirement annotation to PersistenceResource::httpPutPersistenceItemData function (#2406)
Signed-off-by: Paul Vogel <github@paulvogel.me>
This commit is contained in:
parent
f58fce3500
commit
5cc76378a0
@ -199,9 +199,10 @@ public class PersistenceResource implements RESTResource {
|
|||||||
@RolesAllowed({ Role.ADMIN })
|
@RolesAllowed({ Role.ADMIN })
|
||||||
@Path("/items/{itemname: [a-zA-Z_0-9]+}")
|
@Path("/items/{itemname: [a-zA-Z_0-9]+}")
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(operationId = "storeItemDataInPersistenceService", summary = "Stores item persistence data into the persistence service.", responses = {
|
@Operation(operationId = "storeItemDataInPersistenceService", summary = "Stores item persistence data into the persistence service.", security = {
|
||||||
@ApiResponse(responseCode = "200", description = "OK"),
|
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
|
||||||
@ApiResponse(responseCode = "404", description = "Unknown Item or persistence service") })
|
@ApiResponse(responseCode = "200", description = "OK"),
|
||||||
|
@ApiResponse(responseCode = "404", description = "Unknown Item or persistence service") })
|
||||||
public Response httpPutPersistenceItemData(@Context HttpHeaders headers,
|
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 = "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,
|
@Parameter(description = "The item name.") @PathParam("itemname") String itemName,
|
||||||
|
Loading…
Reference in New Issue
Block a user