From fe9f0aea4d19618fbc15db0feaaf16f6caf03faf Mon Sep 17 00:00:00 2001 From: Roman Strobl Date: Fri, 20 Dec 2024 10:45:22 +0100 Subject: [PATCH] Update list annotations --- .../client/model/request/OperationTemplateCreateRequest.java | 2 +- .../client/model/request/OperationTemplateUpdateRequest.java | 2 +- .../client/model/request/RevokeRecoveryCodesRequest.java | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/powerauth-client-model/src/main/java/com/wultra/security/powerauth/client/model/request/OperationTemplateCreateRequest.java b/powerauth-client-model/src/main/java/com/wultra/security/powerauth/client/model/request/OperationTemplateCreateRequest.java index db5bf9ae3..3fe00ad6c 100644 --- a/powerauth-client-model/src/main/java/com/wultra/security/powerauth/client/model/request/OperationTemplateCreateRequest.java +++ b/powerauth-client-model/src/main/java/com/wultra/security/powerauth/client/model/request/OperationTemplateCreateRequest.java @@ -66,7 +66,7 @@ public class OperationTemplateCreateRequest { @JsonSetter(nulls = Nulls.SKIP) @Schema(description = "Allowed signature types") @NotEmpty(message = "Template signature types must contain at least one value") - private final List signatureType = new ArrayList<>(); + private final List<@NotNull SignatureType> signatureType = new ArrayList<>(); /** * How many failed attempts should be allowed for the operation. diff --git a/powerauth-client-model/src/main/java/com/wultra/security/powerauth/client/model/request/OperationTemplateUpdateRequest.java b/powerauth-client-model/src/main/java/com/wultra/security/powerauth/client/model/request/OperationTemplateUpdateRequest.java index c5b4365be..2f6a58204 100644 --- a/powerauth-client-model/src/main/java/com/wultra/security/powerauth/client/model/request/OperationTemplateUpdateRequest.java +++ b/powerauth-client-model/src/main/java/com/wultra/security/powerauth/client/model/request/OperationTemplateUpdateRequest.java @@ -54,7 +54,7 @@ public class OperationTemplateUpdateRequest { @Schema(description = "Allowed signature types") @NotEmpty(message = "Template signature types must contain at least one value") @JsonSetter(nulls = Nulls.SKIP) - private final List signatureType = new ArrayList<>(); + private final List<@NotNull SignatureType> signatureType = new ArrayList<>(); @Schema(description = "How many failed attempts should be allowed for the operation") @NotNull(message = "Template expiration value must not be null when updating operation template") diff --git a/powerauth-client-model/src/main/java/com/wultra/security/powerauth/client/model/request/RevokeRecoveryCodesRequest.java b/powerauth-client-model/src/main/java/com/wultra/security/powerauth/client/model/request/RevokeRecoveryCodesRequest.java index fc50d7dd4..3f1f112ee 100644 --- a/powerauth-client-model/src/main/java/com/wultra/security/powerauth/client/model/request/RevokeRecoveryCodesRequest.java +++ b/powerauth-client-model/src/main/java/com/wultra/security/powerauth/client/model/request/RevokeRecoveryCodesRequest.java @@ -21,6 +21,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; import lombok.Data; import java.util.ArrayList; @@ -36,6 +37,6 @@ public class RevokeRecoveryCodesRequest { @Schema(description = "List of recovery code identifiers") @NotEmpty(message = "List of recovery code identifiers must not be empty when revoking recovery codes") - private List<@NotBlank Long> recoveryCodeIds = new ArrayList<>(); + private List<@NotNull Long> recoveryCodeIds = new ArrayList<>(); }