Skip to content

Commit

Permalink
PAGOPA-1726 fixing openapi
Browse files Browse the repository at this point in the history
  • Loading branch information
FedericoRuzzier committed Apr 29, 2024
1 parent 87b9a38 commit e3f4f7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -18,6 +19,7 @@ public class PaymentOptionMulti {
private List<PspSearchCriteria> idPspList;
@Valid @NotNull @NotEmpty private List<PaymentNoticeItem> paymentNotice;

@JsonIgnore
public Long getPaymentAmount () {
return this.getPaymentNotice().stream().mapToLong(PaymentNoticeItem::getPaymentAmount).sum();
}
Expand Down

0 comments on commit e3f4f7d

Please sign in to comment.