[REST][Docs] Corrects the docs for security requirement for the ThingResource (in the openapi specification) (#2404)
* Add @SecurityRequirement annotation to ThingResource::getAll function Signed-off-by: Paul Vogel <github@paulvogel.me>pull/2410/head
parent
5cc76378a0
commit
1f2beea19e
|
@ -287,8 +287,9 @@ public class ThingResource implements RESTResource {
|
|||
@GET
|
||||
@RolesAllowed({ Role.ADMIN })
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
@Operation(operationId = "getThings", summary = "Get all available things.", responses = {
|
||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = EnrichedThingDTO.class), uniqueItems = true))) })
|
||||
@Operation(operationId = "getThings", summary = "Get all available things.", security = {
|
||||
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
|
||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = EnrichedThingDTO.class), uniqueItems = true))) })
|
||||
public Response getAll(
|
||||
@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @Parameter(description = "language") @Nullable String language,
|
||||
@QueryParam("summary") @Parameter(description = "summary fields only") @Nullable Boolean summary) {
|
||||
|
|
Loading…
Reference in New Issue