Skip to content

Commit

Permalink
manage GPU InstitutionType
Browse files Browse the repository at this point in the history
  • Loading branch information
giulia-tremolada committed Dec 18, 2024
1 parent 696be71 commit 1732884
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 12 deletions.
4 changes: 2 additions & 2 deletions connector-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
<dependency>
<groupId>it.pagopa.selfcare</groupId>
<artifactId>onboarding-sdk-product</artifactId>
<version>0.3.3</version>
<version>0.6.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>it.pagopa.selfcare</groupId>
<artifactId>onboarding-sdk-common</artifactId>
<version>0.3.3</version>
<version>0.6.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
20 changes: 16 additions & 4 deletions connector/rest/docs/openapi/api-selfcare-core-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,15 @@
"schema" : {
"type" : "string"
}
}, {
"name" : "productId",
"in" : "query",
"description" : "productId",
"required" : false,
"style" : "form",
"schema" : {
"type" : "string"
}
} ],
"responses" : {
"200" : {
Expand Down Expand Up @@ -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" : {
Expand Down Expand Up @@ -2736,6 +2745,9 @@
"institutionFromName" : {
"type" : "string"
},
"institutionFromRootName" : {
"type" : "string"
},
"institutionToName" : {
"type" : "string"
},
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -89,7 +88,7 @@ public List<Institution> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ 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<Institution> institutions = msCoreConnector.getInstitutionsFromTaxCode(institutionMock.getTaxCode(), null, null, null);
// then

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
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<description>Self Care Dashboard Backend</description>

<properties>
<selc-commons.version>2.5.4</selc-commons.version>
<selc-commons.version>2.5.5</selc-commons.version>
<sonar.host.url>https://sonarcloud.io/</sonar.host.url>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<dependency>
<groupId>it.pagopa.selfcare</groupId>
<artifactId>onboarding-sdk-product</artifactId>
<version>0.3.2</version>
<version>0.6.2</version>
<scope>compile</scope>
</dependency>

Expand Down

0 comments on commit 1732884

Please sign in to comment.