fixed swagger request params annotation
This commit is contained in:
parent
8b94a69a09
commit
bb532ba1ce
@ -16,6 +16,8 @@
|
||||
package org.thingsboard.server.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.media.ArraySchema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -156,7 +158,7 @@ public class NotificationTargetController extends BaseController {
|
||||
SYSTEM_OR_TENANT_AUTHORITY_PARAGRAPH)
|
||||
@GetMapping(value = "/targets", params = {"ids"})
|
||||
@PreAuthorize("hasAnyAuthority('SYS_ADMIN', 'TENANT_ADMIN')")
|
||||
public List<NotificationTarget> getNotificationTargetsByIds(@Parameter(description = "Comma-separated list of uuids representing targets ids", required = true)
|
||||
public List<NotificationTarget> getNotificationTargetsByIds(@Parameter(description = "Comma-separated list of uuids representing targets ids", array = @ArraySchema(schema = @Schema(type = "string")), required = true)
|
||||
@RequestParam("ids") UUID[] ids,
|
||||
@AuthenticationPrincipal SecurityUser user) {
|
||||
// PE: generic permission
|
||||
|
||||
@ -16,6 +16,8 @@
|
||||
package org.thingsboard.server.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.media.ArraySchema;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -147,7 +149,7 @@ public class NotificationTemplateController extends BaseController {
|
||||
@RequestParam(required = false) String sortProperty,
|
||||
@Parameter(description = SORT_ORDER_DESCRIPTION)
|
||||
@RequestParam(required = false) String sortOrder,
|
||||
@Parameter(description = "Comma-separated list of notification types to filter the templates")
|
||||
@Parameter(description = "Comma-separated list of notification types to filter the templates", array = @ArraySchema(schema = @Schema(type = "string")))
|
||||
@RequestParam(required = false) NotificationType[] notificationTypes,
|
||||
@AuthenticationPrincipal SecurityUser user) throws ThingsboardException {
|
||||
// PE: generic permission
|
||||
|
||||
@ -251,7 +251,8 @@ public class TenantProfileController extends BaseController {
|
||||
|
||||
@GetMapping(value = "/tenantProfiles", params = {"ids"})
|
||||
@PreAuthorize("hasAuthority('SYS_ADMIN')")
|
||||
public List<TenantProfile> getTenantProfilesByIds(@RequestParam("ids") UUID[] ids) {
|
||||
public List<TenantProfile> getTenantProfilesByIds(@Parameter(description = "Comma-separated list of tenant profile ids")
|
||||
@RequestParam("ids") UUID[] ids) {
|
||||
return tenantProfileService.findTenantProfilesByIds(TenantId.SYS_TENANT_ID, ids);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user