From 1732884dd7b14c17e8d9b5a12292575a5980cc61 Mon Sep 17 00:00:00 2001 From: Giulia Tremolada Date: Wed, 18 Dec 2024 15:37:27 +0100 Subject: [PATCH] manage GPU InstitutionType --- connector-api/pom.xml | 4 ++-- .../docs/openapi/api-selfcare-core-docs.json | 20 +++++++++++++++---- .../connector/rest/CoreConnectorImpl.java | 3 +-- .../connector/rest/CoreConnectorImplTest.java | 4 ++-- pom.xml | 2 +- web/pom.xml | 2 +- 6 files changed, 23 insertions(+), 12 deletions(-) diff --git a/connector-api/pom.xml b/connector-api/pom.xml index ba4e168f..bba90e1f 100644 --- a/connector-api/pom.xml +++ b/connector-api/pom.xml @@ -23,13 +23,13 @@ it.pagopa.selfcare onboarding-sdk-product - 0.3.3 + 0.6.2 compile it.pagopa.selfcare onboarding-sdk-common - 0.3.3 + 0.6.2 compile diff --git a/connector/rest/docs/openapi/api-selfcare-core-docs.json b/connector/rest/docs/openapi/api-selfcare-core-docs.json index 22f5f0d4..b98177a4 100644 --- a/connector/rest/docs/openapi/api-selfcare-core-docs.json +++ b/connector/rest/docs/openapi/api-selfcare-core-docs.json @@ -788,6 +788,15 @@ "schema" : { "type" : "string" } + }, { + "name" : "productId", + "in" : "query", + "description" : "productId", + "required" : false, + "style" : "form", + "schema" : { + "type" : "string" + } } ], "responses" : { "200" : { @@ -2086,7 +2095,7 @@ "style" : "simple", "schema" : { "type" : "string", - "enum" : [ "AS", "CON", "GSP", "PA", "PG", "PRV", "PSP", "PT", "REC", "SA", "SCP" ] + "enum" : [ "AS", "CON", "GPU", "GSP", "PA", "PG", "PRV", "PSP", "PT", "REC", "SA", "SCP" ] } } ], "responses" : { @@ -2736,6 +2745,9 @@ "institutionFromName" : { "type" : "string" }, + "institutionFromRootName" : { + "type" : "string" + }, "institutionToName" : { "type" : "string" }, @@ -2961,7 +2973,7 @@ }, "institutionType" : { "type" : "string", - "enum" : [ "AS", "CON", "GSP", "PA", "PG", "PRV", "PSP", "PT", "REC", "SA", "SCP" ] + "enum" : [ "AS", "CON", "GPU", "GSP", "PA", "PG", "PRV", "PSP", "PT", "REC", "SA", "SCP" ] }, "subunitCode" : { "type" : "string" @@ -3223,7 +3235,7 @@ }, "institutionType" : { "type" : "string", - "enum" : [ "AS", "CON", "GSP", "PA", "PG", "PRV", "PSP", "PT", "REC", "SA", "SCP" ] + "enum" : [ "AS", "CON", "GPU", "GSP", "PA", "PG", "PRV", "PSP", "PT", "REC", "SA", "SCP" ] }, "onboarding" : { "type" : "array", @@ -3437,7 +3449,7 @@ }, "institutionType" : { "type" : "string", - "enum" : [ "AS", "CON", "GSP", "PA", "PG", "PRV", "PSP", "PT", "REC", "SA", "SCP" ] + "enum" : [ "AS", "CON", "GPU", "GSP", "PA", "PG", "PRV", "PSP", "PT", "REC", "SA", "SCP" ] }, "ivassCode" : { "type" : "string" diff --git a/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/CoreConnectorImpl.java b/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/CoreConnectorImpl.java index 8a8c3e0b..5851f65a 100644 --- a/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/CoreConnectorImpl.java +++ b/connector/rest/src/main/java/it/pagopa/selfcare/dashboard/connector/rest/CoreConnectorImpl.java @@ -32,7 +32,6 @@ import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; -import javax.validation.ValidationException; import java.util.Collection; import java.util.Collections; import java.util.List; @@ -89,7 +88,7 @@ public List getInstitutionsFromTaxCode(String taxCode, String subun log.trace("getInstitution start"); log.debug("getInstitution institutionId = {}", taxCode); Assert.hasText(taxCode, REQUIRED_TAX_CODE_MESSAGE); - InstitutionsResponse institutions = coreInstitutionApiRestClient._getInstitutionsUsingGET(taxCode, subunitCode, origin, originId).getBody(); + InstitutionsResponse institutions = coreInstitutionApiRestClient._getInstitutionsUsingGET(taxCode, subunitCode, origin, originId, null).getBody(); log.debug("getInstitution result = {}", institutions); log.trace("getInstitution end"); Assert.notNull(institutions, NO_INSTITUTION_FOUND); diff --git a/connector/rest/src/test/java/it/pagopa/selfcare/dashboard/connector/rest/CoreConnectorImplTest.java b/connector/rest/src/test/java/it/pagopa/selfcare/dashboard/connector/rest/CoreConnectorImplTest.java index 34ccbfd5..406d931c 100644 --- a/connector/rest/src/test/java/it/pagopa/selfcare/dashboard/connector/rest/CoreConnectorImplTest.java +++ b/connector/rest/src/test/java/it/pagopa/selfcare/dashboard/connector/rest/CoreConnectorImplTest.java @@ -146,7 +146,7 @@ void getInstitutionsFromTaxCode() throws IOException { InstitutionsResponse institutionsResponse = new InstitutionsResponse(); institutionsResponse.setInstitutions(List.of(institutionMock)); - when(coreInstitutionApiRestClient._getInstitutionsUsingGET(institutionMock.getTaxCode(), null, null, null)) + when(coreInstitutionApiRestClient._getInstitutionsUsingGET(institutionMock.getTaxCode(), null, null, null, null)) .thenReturn(ResponseEntity.of(Optional.of(institutionsResponse))); // when List institutions = msCoreConnector.getInstitutionsFromTaxCode(institutionMock.getTaxCode(), null, null, null); @@ -154,7 +154,7 @@ void getInstitutionsFromTaxCode() throws IOException { assertEquals(institutions.get(0), institutionMapperSpy.toInstitution(institutionMock)); verify(coreInstitutionApiRestClient, times(1)) - ._getInstitutionsUsingGET(institutionMock.getTaxCode(), null, null, null); + ._getInstitutionsUsingGET(institutionMock.getTaxCode(), null, null, null, null); } @Test diff --git a/pom.xml b/pom.xml index 720884a8..41ad6b1a 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ Self Care Dashboard Backend - 2.5.4 + 2.5.5 https://sonarcloud.io/ diff --git a/web/pom.xml b/web/pom.xml index c6eee0ef..c49d179b 100644 --- a/web/pom.xml +++ b/web/pom.xml @@ -42,7 +42,7 @@ it.pagopa.selfcare onboarding-sdk-product - 0.3.2 + 0.6.2 compile