diff --git a/src/main/java/it/gov/pagopa/afm/calculator/controller/CalculatorController.java b/src/main/java/it/gov/pagopa/afm/calculator/controller/CalculatorController.java index d35127ab..71248483 100644 --- a/src/main/java/it/gov/pagopa/afm/calculator/controller/CalculatorController.java +++ b/src/main/java/it/gov/pagopa/afm/calculator/controller/CalculatorController.java @@ -195,7 +195,7 @@ public BundleOption getFees( content = @Content( mediaType = MediaType.APPLICATION_JSON_VALUE, - schema = @Schema(implementation = BundleOption.class))), + schema = @Schema(implementation = it.gov.pagopa.afm.calculator.model.calculatormulti.BundleOption.class))), @ApiResponse( responseCode = "400", description = "Bad Request", @@ -277,7 +277,7 @@ public it.gov.pagopa.afm.calculator.model.calculatormulti.BundleOption getFeesBy content = @Content( mediaType = MediaType.APPLICATION_JSON_VALUE, - schema = @Schema(implementation = BundleOption.class))), + schema = @Schema(implementation = it.gov.pagopa.afm.calculator.model.calculatormulti.BundleOption.class))), @ApiResponse( responseCode = "400", description = "Bad Request", diff --git a/src/main/java/it/gov/pagopa/afm/calculator/model/PaymentOptionMulti.java b/src/main/java/it/gov/pagopa/afm/calculator/model/PaymentOptionMulti.java index e79dac16..f1615386 100644 --- a/src/main/java/it/gov/pagopa/afm/calculator/model/PaymentOptionMulti.java +++ b/src/main/java/it/gov/pagopa/afm/calculator/model/PaymentOptionMulti.java @@ -1,5 +1,6 @@ package it.gov.pagopa.afm.calculator.model; +import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.*; import javax.validation.Valid; import javax.validation.constraints.NotEmpty; @@ -18,6 +19,7 @@ public class PaymentOptionMulti { private List idPspList; @Valid @NotNull @NotEmpty private List paymentNotice; + @JsonIgnore public Long getPaymentAmount () { return this.getPaymentNotice().stream().mapToLong(PaymentNoticeItem::getPaymentAmount).sum(); }