Skip to content

Commit

Permalink
fixing openapi
Browse files Browse the repository at this point in the history
  • Loading branch information
LuciaM1 committed Jul 15, 2024
1 parent d73a488 commit eb924d7
Show file tree
Hide file tree
Showing 20 changed files with 137 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import org.eclipse.microprofile.openapi.annotations.media.Schema;

import java.util.Objects;

@AllArgsConstructor
@Getter
@Setter
public class BankConfigTripletDto {
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String acquirerId;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String branchId;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String terminalId;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import jakarta.ws.rs.core.MediaType;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.jboss.resteasy.reactive.PartType;

import java.io.File;
Expand All @@ -23,16 +24,16 @@ public class BpmnCreationDto {
@FormParam("filename")
@NotNull(message = "field is required")
@Pattern(regexp = "^[a-zA-Z0-9_-]+$", message = "deve essere della forma ${regexp} e non contenere l'estensione del file")
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String filename;

@FormParam("functionType")
@NotNull(message = "field is required")
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String functionType;

@FormParam("description")
@Nullable
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String description;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import jakarta.ws.rs.core.MediaType;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.jboss.resteasy.reactive.PartType;

import java.io.File;
Expand All @@ -28,16 +29,16 @@ public class BpmnUpgradeDto {
@FormParam("filename")
@NotNull(message = "filename is required")
@Pattern(regexp = "^[a-zA-Z0-9_-]+$", message = "deve essere della forma ${regexp} e non contenere l'estensione del file")
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String filename;

@FormParam("functionType")
@NotNull(message = "function type is required")
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String functionType;

@FormParam("description")
@Nullable
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String description;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@NoArgsConstructor
public class BranchConfigs {

@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String branchId;

private UUID branchDefaultTemplateId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public class ResourceCreationDto {
pattern = "(^$)|(^(?!/)[a-zA-Z0-9/]+(?<!/)$)", maxLength = 255)
private String path;
@FormParam("description")
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String description;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import jakarta.ws.rs.core.MediaType;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.jboss.resteasy.reactive.PartType;

import java.io.File;
Expand All @@ -24,7 +25,7 @@ public class WorkflowResourceCreationDto {
@FormParam("filename")
@NotNull(message = "filename is required")
@Pattern(regexp = "^[a-zA-Z0-9_-]+$", message = "deve essere della forma ${regexp} e non contenere l'estensione del file")
@Size(max=255)
@Schema(format = "byte", maxLength = 255)
private String filename;

@FormParam("resourceType")
Expand All @@ -33,6 +34,6 @@ public class WorkflowResourceCreationDto {

@FormParam("description")
@Nullable
@Size(max=255)
@Schema(format = "byte", maxLength = 255)
private String description;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ public class BpmnBankConfigDTO {
private UUID bpmnId;
@Schema(minimum = "1", maximum = "10000")
private Long bpmnModelVersion;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String acquirerId;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String branchId;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String terminalId;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String functionType;
@Schema(description = "Creation Timestamp", format = "date-time", pattern = "DD/MM/YYYY", example = "{\"date\":\"2023-11-03T14:18:36.635+00:00\"}")
private Timestamp createdAt;
@Schema(description = "Last Update Timestamp", format = "date-time", pattern = "DD/MM/YYYY", example = "{\"date\":\"2023-11-03T14:18:36.635+00:00\"}")
private Timestamp lastUpdatedAt;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String createdBy;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String lastUpdatedBy;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,33 @@ public class BpmnDTO {
private UUID bpmnId;
@Schema(minimum = "1", maximum = "10000")
private Long modelVersion;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String deployedFileName;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String definitionKey;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String functionType;
private StatusEnum status;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String sha256;
private Boolean enabled;
@Schema(minimum = "1", maximum = "10000")
private Integer definitionVersionCamunda;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String camundaDefinitionId;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String description;
private ResourceFileDTO resourceFile;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String resource;
private UUID deploymentId;
@Schema(description = "Creation Timestamp", format = "timestamp", pattern = "DD/MM/YYYY", example = "{\"date\":\"2023-11-03T14:18:36.635+00:00\"}")
private Timestamp createdAt;
@Schema(description = "Last Update Timestamp", format = "timestamp", pattern = "DD/MM/YYYY", example = "{\"date\":\"2023-11-03T14:18:36.635+00:00\"}")
private Timestamp lastUpdatedAt;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String createdBy;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String lastUpdatedBy;

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,47 +20,47 @@ public class BpmnFrontEndDTO {
private UUID bpmnId;
@Schema(minimum = "1", maximum = "10000")
private Long modelVersion;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String deployedFileName;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String definitionKey;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String functionType;
private StatusEnum status;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String sha256;
private Boolean enabled;
@Schema(minimum = "1", maximum = "10000")
private Integer definitionVersionCamunda;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String camundaDefinitionId;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String description;
private UUID resourceId;
private S3ResourceTypeEnum resourceType;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String storageKey;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String fileName;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String extension;
@Schema(description = "Creation Timestamp", format = "timestamp", pattern = "DD/MM/YYYY", example = "{\"date\":\"2023-11-03T14:18:36.635+00:00\"}")
private Timestamp resourceCreatedAt;
@Schema(description = "Last Update Timestamp", format = "timestamp", pattern = "DD/MM/YYYY", example = "{\"date\":\"2023-11-03T14:18:36.635+00:00\"}")
private Timestamp resourceLastUpdatedAt;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String resourceCreatedBy;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String resourceLastUpdatedBy;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String resource;
private UUID deploymentId;
@Schema(description = "Creation Timestamp", format = "timestamp", pattern = "DD/MM/YYYY", example = "{\"date\":\"2023-11-03T14:18:36.635+00:00\"}")
private Timestamp createdAt;
@Schema(description = "Last Update Timestamp", format = "timestamp", pattern = "DD/MM/YYYY", example = "{\"date\":\"2023-11-03T14:18:36.635+00:00\"}")
private Timestamp lastUpdatedAt;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String createdBy;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String lastUpdatedBy;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import jakarta.validation.constraints.Size;
import lombok.*;
import org.eclipse.microprofile.openapi.annotations.media.Schema;

@Getter
@Setter
Expand All @@ -12,6 +13,6 @@
@EqualsAndHashCode
public class BpmnProcessDTO {

@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String camundaDefinitionId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
@RegisterForReflection
public class ErrorResponse {

@Size(max=255)
@Schema(format = "byte", maxLength = 255)
private String type;

@Schema(example = "Internal Server Error", maxLength = 255)
@Schema(example = "Internal Server Error",format = "byte", maxLength = 255)
private String title;

@Schema(example = "500", minimum = "1", maximum = "999")
private int status;

@Schema(example = "An unexpected error has occurred. Please contact support.", maxLength = 1000)
@Schema(example = "An unexpected error has occurred. Please contact support.",format = "byte", maxLength = 1000)
private String detail;

@Schema(example = "ATMLM-500", maxLength = 255)
@Schema(example = "ATMLM-500",format = "byte", maxLength = 255)
private String instance;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.eclipse.microprofile.openapi.annotations.media.Schema;

import java.sql.Timestamp;
import java.util.UUID;
Expand All @@ -12,19 +13,19 @@
@NoArgsConstructor
public class ResourceDTO {
private UUID resourceId;
@Size(max=255)
@Schema(format = "byte", maxLength = 255)
private String sha256;
private Boolean enabled;
NoDeployableResourceType noDeployableResourceType;
private Timestamp createdAt;
private Timestamp lastUpdatedAt;
@Size(max=255)
@Schema(format = "byte", maxLength = 255)
private String createdBy;
@Size(max=255)
@Schema(format = "byte", maxLength = 255)
private String lastUpdatedBy;
@Size(max=255)
@Schema(format = "byte", maxLength = 255)
private String cdnUrl;
private ResourceFileDTO resourceFile;
@Size(max=255)
@Schema(format = "byte", maxLength = 255)
private String description;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@
public class ResourceFileDTO {
private UUID id;
private S3ResourceTypeEnum resourceType;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String storageKey;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String fileName;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String extension;
@Schema(description = "Creation Timestamp", format = "timestamp", pattern = "DD/MM/YYYY", example = "{\"date\":\"2023-11-03T14:18:36.635+00:00\"}")
private Timestamp createdAt;
@Schema(description = "Last Update Timestamp", format = "timestamp", pattern = "DD/MM/YYYY", example = "{\"date\":\"2023-11-03T14:18:36.635+00:00\"}")
private Timestamp lastUpdatedAt;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String createdBy;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String lastUpdatedBy;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,32 @@
@AllArgsConstructor
public class ResourceFrontEndDTO {
private UUID resourceId;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String sha256;
private Boolean enabled;
NoDeployableResourceType noDeployableResourceType;
private Timestamp createdAt;
private Timestamp lastUpdatedAt;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String createdBy;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String lastUpdatedBy;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String cdnUrl;
private UUID resourceFileId;
private S3ResourceTypeEnum resourceType;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String storageKey;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String fileName;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String extension;
@Schema(description = "Creation Timestamp", format = "timestamp", pattern = "DD/MM/YYYY", example = "{\"date\":\"2023-11-03T14:18:36.635+00:00\"}")
private Timestamp resourceFileCreatedAt;
@Schema(description = "Last Update Timestamp", format = "timestamp", pattern = "DD/MM/YYYY", example = "{\"date\":\"2023-11-03T14:18:36.635+00:00\"}")
private Timestamp resourceFileLastUpdatedAt;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String resourceFileCreatedBy;
@Size(max = 255)
@Schema(format = "byte", maxLength = 255)
private String resourceFileLastUpdatedBy;
}
Loading

0 comments on commit eb924d7

Please sign in to comment.