Skip to content

Commit

Permalink
Remove redundant parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
romanstrobl committed Nov 28, 2024
1 parent 3682aa8 commit 26506c2
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,27 @@
@Data
public class OperationApproveRequest {

@Schema(description = "The identifier of the operation", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "The identifier of the operation")
@NotBlank(message = "Operation ID must not be empty when approving operation")
private String operationId;

@Schema(description = "The identifier of the user", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "The identifier of the user")
@NotBlank(message = "User ID must not be empty when approving operation")
private String userId;

@Schema(description = "The identifier of the application", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "The identifier of the application")
@NotBlank(message = "Application ID must not be empty when approving operation")
private String applicationId;

@Schema(description = "Operation data to approve", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "Operation data to approve")
@NotBlank(message = "Data must not be empty when approving operation")
private String data;

@Schema(description = "PowerAuth signature type", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "PowerAuth signature type")
@NotNull(message = "Signature type must not be null when approving operation")
private SignatureType signatureType;

@Schema(description = "Additional data associated with the operation", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Schema(description = "Additional data associated with the operation")
@JsonSetter(nulls = Nulls.SKIP)
private final Map<String, Object> additionalData = new LinkedHashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
@Data
public class OperationCancelRequest {

@Schema(description = "The identifier of the operation", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "The identifier of the operation")
@NotBlank(message = "Operation ID must not be empty when cancelling operation")
private String operationId;

@Schema(description = "Additional data associated with the operation", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Schema(description = "Additional data associated with the operation")
@JsonSetter(nulls = Nulls.SKIP)
private final Map<String, Object> additionalData = new LinkedHashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ public class OperationClaimRequest {
/**
* Operation identifier.
*/
@Schema(description = "The identifier of the operation", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "The identifier of the operation")
@NotBlank(message = "Operation ID must not be empty when requesting operation claim")
private String operationId;

/**
* User identifier of the user who is claiming the operation.
*/
@Schema(description = "The identifier of the user", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "The identifier of the user")
@NotBlank(message = "User ID must not be empty when requesting operation claim")
private String userId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,40 @@
@Data
public class OperationCreateRequest {

@Schema(description = "The identifier of the user", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Schema(description = "The identifier of the user")
@Size(min = 1, message = "User ID must not be empty when creating operation")
private String userId;

@Schema(description = "List of associated applications", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "List of associated applications")
@NotNull(message = "Application ID list must not be null when creating operation")
@Size(min = 1, message = "Application ID list must not be empty when creating operation")
private List<String> applications = new ArrayList<>();

@Schema(description = "Activation flag associated with the operation", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Schema(description = "Activation flag associated with the operation")
private String activationFlag;

@Schema(description = "Name of the template used for creating the operation", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "Name of the template used for creating the operation")
@NotBlank(message = "Template name must not be empty when creating operation")
private String templateName;

@Schema(description = "Timestamp of when the operation will expire, overrides expiration period from operation template", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Schema(description = "Timestamp of when the operation will expire, overrides expiration period from operation template")
private Date timestampExpires;

@Schema(description = "External identifier of the operation, i.e., ID from transaction system", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Schema(description = "External identifier of the operation, i.e., ID from transaction system")
private String externalId;

@Schema(description = "Parameters of the operation, will be filled to the operation data", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Schema(description = "Parameters of the operation, will be filled to the operation data")
@JsonSetter(nulls = Nulls.SKIP)
private final Map<String, String> parameters = new LinkedHashMap<>();

@Schema(description = "Additional data associated with the operation to initialize the operation context", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Schema(description = "Additional data associated with the operation to initialize the operation context")
@JsonSetter(nulls = Nulls.SKIP)
private Map<String, Object> additionalData = new LinkedHashMap<>();

@Schema(description = "Whether proximity check should be used, overrides configuration from operation template", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Schema(description = "Whether proximity check should be used, overrides configuration from operation template")
private Boolean proximityCheckEnabled;

@Schema(description = "Activation ID. It is possible to specify a single device (otherwise all user's activations are taken into account).", requiredMode = Schema.RequiredMode.NOT_REQUIRED, maxLength = 37)
@Schema(description = "Activation ID. It is possible to specify a single device (otherwise all user's activations are taken into account).")
@Size(max = 37, message = "Activation ID must not exceed 37 characters when creating operation")
private String activationId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
@Data
public class OperationDetailRequest {

@Schema(description = "The identifier of the operation", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "The identifier of the operation")
@NotBlank(message = "Operation ID must not be empty when requesting operation detail")
private String operationId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
@Data
public class OperationExtIdRequest {

@Schema(description = "External identifier of the operation", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "External identifier of the operation")
@NotBlank(message = "External ID must not be empty when requesting operation lookup by external ID")
private String externalId;

@Schema(description = "Associated application identifiers", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "Associated application identifiers")
@NotNull(message = "Application ID list must not be null when requesting operation lookup by external ID")
@Size(min = 1, message = "Application ID list must not be empty when requesting operation lookup by external ID")
private List<String> applications = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
@Data
public class OperationFailApprovalRequest {

@Schema(description = "The identifier of the operation", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "The identifier of the operation")
@NotBlank(message = "Operation ID must not be empty when requesting operation approval failure")
private String operationId;

@Schema(description = "Additional data associated with the operation", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Schema(description = "Additional data associated with the operation")
@JsonSetter(nulls = Nulls.SKIP)
private final Map<String, Object> additionalData = new LinkedHashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
@Data
public class OperationListForUserRequest {

@Schema(description = "The identifier of the user", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "The identifier of the user")
@NotBlank(message = "User ID must not be empty when requesting operation list")
private String userId;

@Schema(description = "Associated application identifiers", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "Associated application identifiers")
@NotNull(message = "Application ID list must not be null when requesting operation list")
@Size(min = 1, message = "Application ID list must not be empty when requesting operation list")
private List<String> applications = new ArrayList<>();
Expand All @@ -51,7 +51,7 @@ public class OperationListForUserRequest {
@Min(1)
private Integer pageSize;

@Schema(description = "The identifier of the activation", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Schema(description = "The identifier of the activation")
private String activationId;

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@
@Data
public class OperationRejectRequest {

@Schema(description = "The identifier of the operation", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "The identifier of the operation")
@NotBlank(message = "Operation ID must not be empty when rejecting operation")
private String operationId;

@Schema(description = "The identifier of the user", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "The identifier of the user")
@NotBlank(message = "User ID must not be empty when rejecting operation")
private String userId;

@Schema(description = "The identifier of the application", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "The identifier of the application")
@NotBlank(message = "Application ID must not be empty when rejecting operation")
private String applicationId;

@Schema(description = "Additional data associated with the operation", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
@Schema(description = "Additional data associated with the operation")
@JsonSetter(nulls = Nulls.SKIP)
private final Map<String, Object> additionalData = new LinkedHashMap<>();

Expand Down

0 comments on commit 26506c2

Please sign in to comment.