Skip to content

Commit

Permalink
[PASELC-655] feat: added mapping configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-deri committed Jan 17, 2024
1 parent aa27324 commit 4719780
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=pagopa_pagopa-api-config-selfcare-integration&metric=alert_status)](https://sonarcloud.io/dashboard?id=pagopa_pagopa-api-config-selfcare-integration)

Spring Application that exposes a subset of the APIs to manage configuration for EC/PSP on the _Nodo dei Pagamenti_, needed by PagoPA SelfCare application.
Spring Application that exposes a subset of the APIs to manage configuration for EC/PSP on the _Nodo dei Pagamenti_,
needed by PagoPA SelfCare application.

- [pagoPa Api Config - SelfCare integration](#pagopa-api-config---selfcare-integration)
* [Api Documentation 📖](#api-documentation---)
Expand All @@ -25,7 +26,8 @@ Spring Application that exposes a subset of the APIs to manage configuration for

## Api Documentation 📖

See the [OpenApi 3 here.](https://editor.swagger.io/?url=https://raw.githubusercontent.com/pagopa/pagopa-api-config-selfcare-integration/main/openapi/openapi.json)
See
the [OpenApi 3 here.](https://editor.swagger.io/?url=https://raw.githubusercontent.com/pagopa/pagopa-api-config-selfcare-integration/main/openapi/openapi.json)

---

Expand Down Expand Up @@ -73,6 +75,9 @@ or, for H2 tests:

`mvn spring-boot:run -Dspring-boot.run.profiles=h2`

Using the spring profile `local`, the Spring application connects to the H2 in-memory DB.
For access to H2 console, use this url: http://localhost:8080/h2-console/

### Spring Profiles

- **local**: to develop locally, pointing to DEV database.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

import it.gov.pagopa.apiconfig.selfcareintegration.mapper.ConvertCanaliToChannelDetails;
import it.gov.pagopa.apiconfig.selfcareintegration.mapper.ConvertIbanMasterToIbanDetail;
import it.gov.pagopa.apiconfig.selfcareintegration.mapper.ConvertPaStazionePaToCreditorInstitutionDetail;
import it.gov.pagopa.apiconfig.selfcareintegration.model.channel.ChannelDetails;
import it.gov.pagopa.apiconfig.selfcareintegration.model.creditorinstitution.CreditorInstitutionDetail;
import it.gov.pagopa.apiconfig.selfcareintegration.model.iban.IbanDetails;
import it.gov.pagopa.apiconfig.starter.entity.Canali;
import it.gov.pagopa.apiconfig.starter.entity.IbanMaster;
import it.gov.pagopa.apiconfig.starter.entity.PaStazionePa;
import org.modelmapper.ModelMapper;
import org.modelmapper.convention.MatchingStrategies;
import org.springframework.context.annotation.Bean;
Expand All @@ -26,6 +29,9 @@ ModelMapper modelMapper() {
mapper
.createTypeMap(IbanMaster.class, IbanDetails.class)
.setConverter(new ConvertIbanMasterToIbanDetail());
mapper
.createTypeMap(PaStazionePa.class, CreditorInstitutionDetail.class)
.setConverter(new ConvertPaStazionePaToCreditorInstitutionDetail());

return mapper;
}
Expand Down

0 comments on commit 4719780

Please sign in to comment.