Skip to content

Commit

Permalink
fix: junit
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaDel03 committed Feb 4, 2025
1 parent c4b532f commit 6989bb1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ GetTermsInsDTO getTermsByChunkIns(
@Tag(name = API_CHANGESET_CHUNKS_TAG)
@Operation(
summary = "Restituisce un chunk dato indice e identificativo snapshot (solo-cancellazioni)",
description = "Servizio che consente di restituire le terminologie presenti nel chunk di un dato snapshot.",
operationId = "listTerminologyFromSnapshotDel"
description = "Servizio che consente di restituire le terminologie presenti nel chunk di un dato snapshot."
)
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Richiesta terminologie avvenuta con successo", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = GetTermsDelDTO.class))),
Expand All @@ -116,7 +115,7 @@ GetTermsDelDTO getTermsByChunkDel(
@Parameter(description = "Identificatore documento (snapshot)")
@NotBlank(message = ERR_VAL_ID_BLANK)
@ValidObjectId(message = ERR_VAL_ID_NOT_VALID)
@Size(max = 10000)
@Size(max = Integer.MAX_VALUE)
String id,
@PathVariable
@Parameter(description = "Indice chunk richiesto (eg. 0, 1, 2...)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import it.finanze.sanita.fse2.ms.edssrvdictionary.dto.response.log.LogTraceInfoDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import org.bson.types.ObjectId;

import java.util.List;
Expand All @@ -30,25 +31,14 @@ public class GetTermsDelDTO extends ResponseDTO {

@ArraySchema(
minItems = 0,
maxItems = 1000000,
schema = @Schema(implementation = DocStrings.class)
maxItems = Integer.MAX_VALUE,
schema = @Schema(type = "string", maxLength = 100000)
)
private List<DocStrings> documents;
@Getter
private List<String> documents;

public GetTermsDelDTO(LogTraceInfoDTO traceInfo, List<ObjectId> data) {
super(traceInfo);
this.documents = data.stream()
.map(ObjectId::toHexString)
.map(DocStrings::new)
.collect(Collectors.toList());
}

@Data
@AllArgsConstructor
public static class DocStrings {

@Schema(maxLength = 100000)
private String document;

this.documents = data.stream().map(ObjectId::toHexString).collect(Collectors.toList());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.core.type.TypeReference;
import org.bson.Document;
import org.bson.types.ObjectId;
import org.junit.jupiter.api.BeforeEach;
Expand Down

0 comments on commit 6989bb1

Please sign in to comment.