Skip to content

Commit

Permalink
Update list annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
romanstrobl committed Dec 20, 2024
1 parent 85882f2 commit fe9f0ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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> signatureType = new ArrayList<>();
private final List<@NotNull SignatureType> signatureType = new ArrayList<>();

/**
* How many failed attempts should be allowed for the operation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> 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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<>();

}

0 comments on commit fe9f0ae

Please sign in to comment.